Interface Not Registered Interop.Outlook

I'm running into a problem trying to access an outlook inbox from vc#. On my machine I am receiving the error "Interface Not Registered" when trying to create a new recipient. I've tested this on another machine and do not get the error message. The following is where I recieve the error,

Outlook.Application app = new Outlook.Application();

Outlook._NameSpace ns = app.GetNamespace("MAPI");

Outlook.Recipient rec = ns.CreateRecipient("somebody@somewhere.com");

Outlook.MAPIFolder fldr = ns.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox);

Outlook.MailItem mail;

It is at the ns.CreateRecipient line that I receive the error, I am using the Outlook 11 object library. I'm assuming there is a dll that needs to be registered Any help would be greatly appreciated.



Answer this question

Interface Not Registered Interop.Outlook

  • Gromey

    Did you install the Outlook 2003 PIAs

    You probably need to add a Namespace.Logon statement since you're starting Outlook externally. Note also, that this means your application will be subject to Outlook object model security prompts.


  • montaquehou

    Yes I've installed the PIAs. What is confusing is that my machine fails with that error with or without the PIAs and the other machine that I've tested on does not have the PIAs does not receive that error.
  • Interface Not Registered Interop.Outlook