I have written the code with help from Microsoft to add contacts to the Oultook Contacts folder from me Acces Db and can also update existing records, but there appear to be some fields which are blocked, such as FirstName and LastName. Does anyone have some nice code to update the Outlook Folder. A short version of what i use is below.
After confiming a contact exists by finding a user defined field contactID, I can update some fields by this.
.....Use to locate the record, and then store the email address
strContactID = Nz(tblContacts![CustomerID])
strEmail1Address = Nz(tblContacts!Address)
..........Find and Do the update
Set varSearchItem2 = colItems.Find("[ContactID] = """ & strContactID & """")
Set itms = varSearchItem2.ItemProperties
itms.Item("Email1Address").Value = strEmail1Address
varSearchItem2.Save
...........loops through my tblContacts
Anything better??????
After confiming a contact exists by finding a user defined field contactID, I can update some fields by this.
.....Use to locate the record, and then store the email address
strContactID = Nz(tblContacts![CustomerID])
strEmail1Address = Nz(tblContacts!Address)
..........Find and Do the update
Set varSearchItem2 = colItems.Find("[ContactID] = """ & strContactID & """")
Set itms = varSearchItem2.ItemProperties
itms.Item("Email1Address").Value = strEmail1Address
varSearchItem2.Save
...........loops through my tblContacts
Anything better??????
Last edited: