AddressEntries Collection Object

AddressEntries Collection Object

The AddressEntries collection object contains one or more AddressEntry objects.

At a Glance

Specified in type library:

CDO.DLL

First available in:

CDO Library version 1.1

Parent objects:

AddressList

Child objects:

AddressEntry AddressEntryFilter

Default property:

Item

An AddressEntries collection is considered a large collection, which means that the Count property has limited validity, and the best way to access an individual AddressEntry object within the collection is to use either its unique identifier or the Get methods. For more information on collections, see Object Collections.

Properties

Name

Available since version

Type

Access

Application

1.1

String

Read-only

Class

1.1

Long

Read-only

Count

1.1

Long

Read-only

Filter

1.1

AddressEntryFilter object

Read/write

Item

1.1

AddressEntry object

Read-only

Parent

1.1

AddressList object

Read-only

RawTable

1.1

IUnknown object

Read/write (Note: Not available to Visual Basic applications)

Session

1.1

Session object

Read-only

Methods

Name

Available since version

Parameters

Add

1.1

emailtype as String, (optional) name as String, (optional) address as String

Delete

1.1

(none)

GetFirst

1.1

(none)

GetLast

1.1

(none)

GetNext

1.1

(none)

GetPrevious

1.1

(none)

Sort

1.1

(optional) SortOrder as Long, (optional) PropTag as Long, (optional) PropID as String

Remarks

Each AddressEntry object in the collection holds information representing a person or process to which the messaging system can deliver messages. An AddressEntries collection provides access to the entries in a MAPI address book container.

An AddressEntries collection can be rendered into HTML hypertext in tabular form using the CDO Rendering ContainerRenderer object. To specify this, set the container renderer's DataSource property to the AddressEntries collection object itself.

With the same DataSource setting, the container renderer's RenderProperty method can also render selected properties of the collection's parent AddressList object. The individual properties that can be rendered are indicated in the AddressList object property descriptions.

Large collections, such as the AddressEntries collection, cannot always maintain an accurate count of the number of objects in the collection. It is strongly recommended that you use the GetFirst, GetLast, GetNext, and GetPrevious methods to access individual items in the collection. You can access one specific address entry by using the Session object's GetAddressEntry method, and you can access all the items in the collection with the Microsoft® Visual Basic® For Each construction.

The order that items are returned by GetFirst, GetLast, GetNext, and GetPrevious depends on whether the address entries are sorted or not. The AddressEntry objects within a collection can be sorted on a MAPI property of your choice, either ascending or descending, using the Sort method. When the items are not sorted, you should not rely on these methods to return the items in any specified order. The best programming approach to use with unsorted collections is to assume that the access functions are able to access all items within the collection, but that the order of the objects is not defined.