George Herrick
Member
- Outlook version
- Outlook 2013 64 bit
- Email Account
- Outlook.com (as MS Exchange)
I have a problem that I am hoping someone can advise me on (or at least point me in the right direction to find an answer). I have created an Access 2013 database that has as one of its functions the ability to update Outlook Contacts. The database actually ended up being quite complex, but I thought this component would be fairly straight forward since there are built-in functions to import and export Outlook contact information. The command SaveAsOutlookContact didn’t work very reliably, though. The Street Address and the Notes fields didn’t consistently save to the contact. I ended up writing my own procedure which works fine and reliably. Here is the code segment…
But… I cannot figure out a way to include the contact picture. I think I have googled just about everything there is to google and have browsed through countless user forums (which is how I came across this site). Is there a way to include the contact picture? Using my existing code, or code you can suggest, or with the built-in functions? Basically, I need a reliable way to import an Outlook contact (complete with picture) into Access and a reliable way to save that contact information back out to Outlook and not lose any information.
Also, I have come across a problem in Outlook 2013 that causes duplicate contacts. First, I thought it was my VBA code. But I then created a contact manually and then created it again. Outlook prompted me that the contact already existed and asked if I wanted to update the existing contact or create a new one. Even when I selected update, it still always creates a new contact. This appears only to happen in 2013 with an Outlook.com account configured as an EAS account.
The operating systems I am using are Windows 7 Pro (32 and 64 –bit versions) and Windows 8.1 (64-bit version). My office suites are Office Pro Plus 2013 (with SP1) and Office 365. The email account I am using is an Outlook.com account setup as an EAS account.
Any help or advice anyone could give me would be greatly appreciated!
Code:
Const olContactItem = 2
Dim olApp As Object
Set olApp = CreateObject("Outlook.Application")
Set olContact = olApp.CreateItem(olContactItem)
With olContact
.FirstName = Nz([First Name])
.LastName = Nz([Last Name])
.JobTitle = Nz([Job Title])
.CompanyName = Nz([Company])
.BusinessAddressStreet = Nz([Address])
.BusinessAddressCity = Nz([City])
.BusinessAddressState = Nz([State/Province])
.BusinessAddressCountry = Nz([Country/Region])
.BusinessAddressPostalCode = Nz([ZIP/Postal Code])
.BusinessTelephoneNumber = Nz([Business Phone])
.BusinessFaxNumber = Nz([Fax Number])
.Email1Address = Nz([E-Mail Address])
.MobileTelephoneNumber = Nz([Mobile Phone])
.Birthday = Nz([Birthdate])
.ReferredBy = Nz([Referred By])
.Spouse = Nz([Spouse Name])
.Body = Nz([Notes])
.Display ' or .Save to save directly without popup.
End With
Set olApp = Nothing
Set olContact = Nothing
But… I cannot figure out a way to include the contact picture. I think I have googled just about everything there is to google and have browsed through countless user forums (which is how I came across this site). Is there a way to include the contact picture? Using my existing code, or code you can suggest, or with the built-in functions? Basically, I need a reliable way to import an Outlook contact (complete with picture) into Access and a reliable way to save that contact information back out to Outlook and not lose any information.
Also, I have come across a problem in Outlook 2013 that causes duplicate contacts. First, I thought it was my VBA code. But I then created a contact manually and then created it again. Outlook prompted me that the contact already existed and asked if I wanted to update the existing contact or create a new one. Even when I selected update, it still always creates a new contact. This appears only to happen in 2013 with an Outlook.com account configured as an EAS account.
The operating systems I am using are Windows 7 Pro (32 and 64 –bit versions) and Windows 8.1 (64-bit version). My office suites are Office Pro Plus 2013 (with SP1) and Office 365. The email account I am using is an Outlook.com account setup as an EAS account.
Any help or advice anyone could give me would be greatly appreciated!