Want Access database to appear as Outlook Address Book

W

wdsnews

We have an existing database which we work with and maintain daily. It
contains email addresses. Is there a simple way for Outlook to use it as an
address book while allowing us to continue using the database normally?
 
A

Arvin Meyer [MVP]

Outlook has a 128 character GUID (Globally Unique IDentifier) which, if
stored in an Access table can be used as a link to connect an Outlook
record, you an Access record. Ask how to write it to an Access table in an
Outlook newsgroup. I only have code which works with an Exchange Server.
Have a look:

Private Sub cmdOutlook_Click()
Dim olApp As Object
Dim nsMAPI As NameSpace
Dim ContactFolder As MAPIFolder
Dim i As Integer
Dim Company As Variant
Dim Contact As Object
Dim Subdivision As Variant
Dim EntryID As Variant

Set olApp = GetObject("", "Outlook.Application")
Set nsMAPI = olApp.GetNamespace("MAPI")
Set ContactFolder = nsMAPI.Folders("Public Folders").Folders("All Public
Folders").Folders("Contacts")
EntryID = DLookup("ContactExchangeEntryID", "tblContact", "[ContactID] =
'" & Me.ContactID & "'")

If Not IsNull(EntryID) Then
Set Contact = nsMAPI.GetItemFromID(EntryID, ContactFolder.StoreID)
Contact.Display
Else
MsgBox ("This customer is not available in the Contacts folder.")
End If
End Sub
 

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