Contacts on Exchange Server

D

DB

The followng code allows me to verify contacts on my local computer, however
we are now using an exchange server - how do I access my contacts on our
exchange server.

Dim appOutlook As New Outlook.Application
Dim nsOutlook As NameSpace
Dim mfContacts As MAPIFolder
Dim ciContact As ContactItem

Set appOutlook = CreateObject("Outlook.Application", "LocalHost")

Set nsOutlook = appOutlook.GetNamespace("MAPI")
Set mfContacts = nsOutlook.GetDefaultFolder(olFolderContacts)

Set ciContact = mfContacts.Items.Find("[FullName] = " & strContact)

Set appOutlook = Nothing

If ciContact Is Nothing Then msgbox "Contact not found"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top