Sync Access Contacts with Outlook (1 Viewer)

hk1

Registered User.
Local time
Today, 12:28
Joined
Sep 1, 2009
Messages
121
I know you can setup your outlook contacts to be a table in Access but that's not what I'm looking to do.

I'd like to have code that, when triggered, updates a given contact's details in Outlook using the information stored in an Access table. I don't need to pull any information from Outlook into Access so I'm not looking to do a full synchronize.

Does anyone know if or where this exists?
 

ajetrumpet

Banned
Local time
Today, 13:28
Joined
Jun 22, 2007
Messages
5,638
i doubt a google search would turn anything up, because it's hard to pinpoint the search words that would be most useful for the search.

I'd do it, but not without being paid. it's a pretty big module to write cuz you gotta use outlook libraries . I don't think Access 2007 has an interface option to do this either.
 

soccer-michel

New member
Local time
Today, 14:28
Joined
Jul 30, 2010
Messages
1
Hello,
I am looking to do the same. This code checks for contacts with firstname and lastname and then updates the middlename. From this I imagine I will seach for a particular contact and update the information.

Sub CheckContacts(FirstName As String, LastName As String, MiddleName As String)
Dim myOutlook As Outlook.Application
Dim myNamespace As Outlook.Namespace
Dim myContact As Outlook.Items
Dim myItems As Outlook.Items
Dim myItem As Object
Dim SearchString As String
SearchString = "[Firstname] = " & FirstName & " and [Lastname] = " & LastName
Set myOutlook = New Outlook.Application
Set myNamespace = myOutlook.GetNamespace("MAPI")
Set myContact = myNamespace.GetDefaultFolder(olFolderContacts).Items
Set myItems = myContact.Restrict(SearchString)
For Each myItem In myItems
If (myItem.Class = olContact) Then
MsgBox "The subject is " & myItem.LastName
myItem.MiddleName = MiddleName
myItem.Save
End If
Next
End Sub
 
Last edited:

Users who are viewing this thread

Top Bottom