Outlook Email from Access

Tim313 used Ask the Experts™
The following article refers to "resolve e-mail addresses against the Outlook Address Book" and shows code using -   .Resolve


Can anyone explain what this method does?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
The article describes using the Outlook type library to create MailItems from data in an Access address book table.  Resolve in this context means getting the ContactItem display name (Save As property) for the specified Recipent which will work if it's in an Outlook address book (e.g. Outlook Contacts).
It is simply determining if that email address is in your Outlook Address Book.

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


expression    Required. An expression that returns a Recipient object.

When you run a program that uses the Microsoft Outlook object model to call the Resolve method, you receive a warning message. This warning message tells you that a program is trying to access the Address Book on your behalf and asks if you want to allow this.

This Visual Basic for Applications (VBA) example uses CreateItem to create a simple task and delegate it as a task request to another user. Before running this example, replace 'Dan Wilson' with a valid recipient name.

Sub AssignTask()
      Dim myOlApp As New Outlook.Application
      Dim myItem As Outlook.TaskItem
      Dim myDelegate As Outlook.Recipient
      Set MyItem = myOlApp.CreateItem(olTaskItem)
      Set myDelegate = MyItem.Recipients.Add("Dan Wilson")
      If myDelegate.Resolved Then
            myItem.Subject = "Prepare Agenda For Meeting"
            myItem.DueDate = Now + 30
      End If
End Sub


Split points; OxonDev for first response, bigtwig for added detail.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial