Partager via


Recipients.ResolveAll Method (Outlook)

Attempts to resolve all the Recipient objects in the Recipients collection against the Address Book.

Syntax

expression .ResolveAll

expression A variable that represents a Recipients object.

Return Value

True if all of the objects were resolved, False if one or more were not.

Example

This Visual Basic for Applications (VBA) example uses the ResolveAll method to attempt to resolve all recipients and, if unsuccessful, displays a message box for each unresolved recipient.

Sub CheckRecipients() 
 
 Dim MyItem As Outlook.MailItem 
 
 Dim myRecipients As Outlook.Recipients 
 
 Dim myRecipient As Outlook.Recipient 
 
 
 
 Set myItem = Application.CreateItem(olMailItem) 
 
 Set myRecipients = myItem.Recipients 
 
 myRecipients.Add("Aaron Con") 
 
 myRecipients.Add("Nate Sun") 
 
 myRecipients.Add("Dan Wilson") 
 
 If Not myRecipients.ResolveAll Then 
 
 For Each myRecipient In myRecipients 
 
 If Not myRecipient.Resolved Then 
 
 MsgBox myRecipient.Name 
 
 End If 
 
 Next 
 
 End If 
 
End Sub

See Also

Concepts

Recipients Object Members

Recipients Object