Retrieving Outlook Contacts

Add-in Express™ Support Service
That's what is more important than anything else

Retrieving Outlook Contacts
Adam B

Posts: 49
Joined: 2013-12-20
I am attempting to retrieve the outlook contacts, based on this blog entry:

I can get the contacts in: Outlook.OlDefaultFolders.olFolderContacts

However, I don't have the Outlook.OlDefaultFolders.olFolderSuggestedContacts contant defined and when I attempt to get the contacts by casting to that constant

(Outlook.OlDefaultFolders) 30

I get an exception: The Suggested Contacts folder cannot be found.

Im using VS2013 and currently developing against Outlook 2013.

My project is set to support outlook 2007 and greater. Though I could give up Outlook 2007 support.

I'm also targeting .Net 4.0.

Posted 14 Nov, 2014 13:11:30 Top
Andrei Smolin

Add-in Express team

Posts: 14294
Joined: 2006-05-11
Hello Adam,

I answered your question in comments to that blog entry. For the convenience of other forum readers, I post it here as well:

You dont see it because that enumeration value was introduced in Outlook 2010. You can use late binding to get that folder; your (OlDefaultFolders )30″ is a correct way. Still, it will only work if your add-in is loaded in Outlook 2010+; you need to check if ADXAddinModule.HostMajorVersion > 12. If you need to switch to supporting Outlook 2010+, please see Changing minimum version .

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 17 Nov, 2014 04:29:40 Top