I'm trying to do a simple outlook integration with c# using Interop when getting the default folder I always get an error.
I'm using Office 2013 64bit, I only have 9.5 on my RegEdit.
I Followed this link
Here's my sample code:
Outlook.MAPIFolder Folder_Contacts;
Outlook.Application outlookObj = application;
Outlook.NameSpace nameSpace1 = application.GetNamespace("MAPI");
Folder_Contacts = (Outlook.MAPIFolder)outlookObj.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts);
Once it gets to GetDefaultFolder the error pops out.
Tried reinstalling,repair, uninstall-install the office but no luck.
This is fixed, I checked my regedit and saw a bunch of keys with version 9.6, I'm using 9.5. So what I did is find and replace those 9.6 to 9.5 and checked it every while if one of those fixed the problem. lol. Eventually it did.
User contributions licensed under CC BY-SA 3.0