Platform SDK: CDO 1.2.1 |
The AddressEntry property contains the AddressEntry object representing the recipient. Read/write.
objRecipient.AddressEntry
Object (AddressEntry)
For a complete description of the relationship between the AddressEntry object and the Recipient object, see Using Addresses.
Accessing the AddressEntry property forces resolution of an unresolved recipient name. If the name cannot be resolved, CDO reports an error. For example, when the recipient contains an empty string, the resolve operation returns CdoE_AMBIGUOUS_RECIP.
This code fragment compares the Address property of the Recipient object with the Address and Type properties of its child AddressEntry object, accessible through the recipient’s AddressEntry property, to demonstrate the relationships between these properties.
' from the sample function Session_AddressEntry If objOneRecip Is Nothing Then MsgBox "must select a recipient" Exit Function End If Set objAddrEntry = objOneRecip.AddressEntry If objAddrEntry Is Nothing Then MsgBox "no valid AddressEntry for this recipient" Exit Function End If ' from the sample function Util_CompareAddressParts strMsg = "Recipient full address = " & objOneRecip.Address strMsg = strMsg & "; AddressEntry type = " & objAddrEntry.Type strMsg = strMsg & "; AddressEntry address = " & _ objAddrEntry.Address MsgBox strMsg ' compare display names strMsg = "Recipient name = " & objOneRecip.Name strMsg = strMsg & "; AddressEntry name = " & objAddrEntry.Name ' Note – the Type properties are NOT the same: ' AddressEntry.Type is the address type, such as SMTP ' Recipient.Type is the recipient type, such as To: or Cc: