Platform SDK: CDO 1.2.1

Address Property (AddressEntry Object)

The Address property specifies the messaging address of an address entry or message recipient. Read/write.

Syntax

objAddressEntry.Address

Data Type

String

Remarks

The AddressEntry object's Address property contains a unique string that identifies a message recipient and provides routing information for messaging systems. The format of the address string is specific to each messaging system.

The AddressEntry object's Address and Type properties can be combined to form the full address, the complete messaging address that appears in the Recipient object's Address property using the following syntax:

    AddressType:AddressValue

The Address property corresponds to the MAPI property PR_EMAIL_ADDRESS. It can be rendered into HTML hypertext using the CDO Rendering ObjectRenderer object. To specify this, set the object renderer's DataSource property to this AddressEntry object and the property parameter of the RenderProperty method to CdoPR_EMAIL_ADDRESS.

Example

' Set up a series of object variables 
' Set the Folder and Messages variables from Session_Inbox 
Set objFolder = objSession.Inbox 
Set objMessages = objFolder.Messages 
' Set the Message object variable from Messages_GetFirst() 
Set objOneMsg = objMessages.GetFirst 
' Set the Recipients collection variable from Message_Recipients() 
Set objRecipColl = objOneMsg.Recipients 
' Set the Recipient object variable from Recipients_Item() 
If 0 = objRecipColl.Count Then 
    MsgBox "No recipients in the list" 
    Exit Function 
End If 
iRecipCollIndex = 1 
Set objOneRecip = objRecipColl.Item(iRecipCollIndex) 
' could also be objRecipColl(iRecipCollIndex) since .Item is default 
 
' set the AddressEntry object variable from Recipient_AddressEntry() 
Set objAddrEntry = objOneRecip.AddressEntry 
' from Util_CompareFullAddressParts() 
' display the values 
strMsg = "Recipient full address = " & objOneRecip.Address 
strMsg = strMsg & "; AddressEntry type = " & objAddrEntry.Type 
strMsg = strMsg & "; AddressEntry address = " & objAddrEntry.Address 
MsgBox strMsg