AmbiguousNames Property (Recipient Object)

AmbiguousNames Property (Recipient Object)

The AmbiguousNames property returns an AddressEntries collection of suggestions for address resolution of the Recipient object. Read-only.

Syntax

objRecipient.AmbiguousNames

Data Type

Object (AddressEntries collection)

Remarks

The AmbiguousNames property is used when the recipient has not been resolved by the Recipient objects Resolve method or the Recipients collections Resolve method. The collection returned in AmbiguousNames represents the AddressEntry objects in the address book that could resolve to the supplied recipient name.

If the collection returned in the AmbiguousNames property is empty, there are no candidates for the supplied recipient name, and it should be considered unresolvable. If the collection contains address entries, they can be displayed to the user so that the appropriate one can be selected. The GetFirstUnresolved and GetNextUnresolved methods can be used to find all the ambiguous recipients in a Recipients collection.

Although the AmbiguousNames property itself is read-only, the collection it returns can be accessed in the normal manner through its Add and Delete methods, and the properties on its member AddressEntry objects retain their respective read/write or read-only accessibility.

Example

' function to attempt ambiguous name resolution (ANR)
Function TryANR(objRecip As Recipient) As Boolean
Dim objAmbigEntries As AddressEntries ' possible resolutions
Dim strChosenID As String ' ID of address entry chosen by user
' ... set up error handling ...
Set objAmbigEntries = objRecip.AmbiguousNames
If objAmbigEntries Is Nothing Then
    MsgBox "No eligible names for resolution"
    objRecip.Delete ' nothing else can be done at this point
    TryANR = False
Else
    ' show address entries to user so one can be chosen, and save its
    ' entry identifier: strChosenID = objAddrEntry.ID
    objRecip.ID = strChosenID
    TryANR = True
End If
End Function
 

See Also

Concepts

Recipient Object