Resolve Method

Microsoft Outlook Visual Basic

Show All

Resolve Method

       

Attempts to resolve a Recipient object against the Address Book. Returns True if the object was resolved, False if it was not.

expression.Resolve

expression    Required. An expression that returns a Recipient object.

Example

This Visual Basic for Applications example uses the Resolve method to attempt to resolve a recipient and, if unsuccessful, displays the item so a user can resolve it manually.

Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olMailItem)
Set myRecipient = myItem.Recipients.Add("Tim O'Brien")
If Not myRecipient.Resolve Then myItem.Display

If you use VBScript, you do not create the Application object, and you cannot use named constants. This example shows how to perform the same task using VBScript.

Set myItem = Application.CreateItem(0)
Set myRecipient = myItem.Recipients.Add("Tim O'Brien")
If Not myRecipient.Resolve Then myItem.Display