Platform SDK: CDO 1.2.1

ID Property (AddressList Object)

The ID property returns the unique identifier of the AddressList object as a string. Read-only.

Syntax

objAddressList.ID

Data Type

String

Remarks

MAPI assigns a permanent, unique identifier when an object is created. This identifier does not change from one MAPI session to another, nor from one messaging domain to another. However, MAPI does not require identifier values to be binary comparable. Accordingly, two identifiers can have different values, yet refer to the same object. In particular, one of them could be a short-term identifier and the other a long-term identifier; these are constructed using different formats.

MAPI compares identifiers with the CompareEntryIDs method, which takes into account the differences between identifier formats and returns True if the identifiers are assigned to the same object. CDO provides the CompareIDs method in the Session object, which furnishes the same functionality. For more information on entry identifiers, see the MAPI Programmer's Reference.

The ID property corresponds to the MAPI property PR_ENTRYID, converted to a string of hexadecimal characters. It can be rendered into HTML hypertext using the CDO Rendering ContainerRenderer object if the container renderer's DataSource property is set to this AddressList object's child AddressEntries collection. To specify this, set the property parameter of the RenderProperty method to CdoPR_ENTRYID.

Example

This code fragment displays the value of the AddressList object's permanent identifier:

Dim strAddressListID as String ' hex string version of ID 
Dim objAddressList as AddressList ' assume valid for this example 
strAddressListID = objAddressList.ID ' global variable 
MsgBox "Address Book ID = " & strAddressListID