Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))

-1

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. enter image description here

Tried reinstalling,repair, uninstall-install the office but no luck.

c#
.net
interop
asked on Stack Overflow May 15, 2019 by Matthew Paulino

1 Answer

-1

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.

answered on Stack Overflow May 15, 2019 by Matthew Paulino

User contributions licensed under CC BY-SA 3.0