none
Does Outlook 2013 have a different way of being called via COM? RRS feed

  • Question

  • We have an Outlook add-in that runs in Outlook 2007 and 2010, getting it ready to work in 2013.  The add-in itself works fine in Outlook 2013, but we communicate to Outlook from our main program to let the add-in know that there is information for it.  We use the following to get a connection to Outlook's Application object:

              OutlookApplication = new ApplicationClass();

    This has worked on every edition of Outlook we have tried it on (2003, 2007, 2010) ... but in 2013 we get a "System.Runtime.InteropServices.COMException" exception with the message:

    "Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE))."

    What is the correct way to instantiate the Outlook Application for Outlook 2013?  Our program targets .Net 4.0 and the Interops appear to be correct.


    mdpowers

    Thursday, February 14, 2013 2:45 AM

Answers

All replies

  • Is either of the applications running with the admin priviledges? Are security contexts the same in both cases?

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    Thursday, February 14, 2013 3:15 AM
  • hi Dmitry,

    At least for now, I am running both the main program and the add-in from the VS debugger, which I "run as Administrator".  I have never had any problems with the instantiation with any earlier version of Outlook.  I have not tried this yet on a "deployed" copy of the program and add-in on an Office 2013 machine.


    mdpowers

    Thursday, February 14, 2013 3:25 AM
  • Can you try to run both Outlook and your app with normal privileges?


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    • Marked as answer by mdpowers-slo Thursday, February 14, 2013 5:10 PM
    Thursday, February 14, 2013 3:58 AM
  • Hi Dmitry,

    That worked ... I ran the installed copy of the main program, rather than the debug version from within VS, and everything worked.  I don't have the add-in with the updates for Outlook 2013 built yet, so ran that from the debugger, and had no problems.

    Thanks muchly!


    mdpowers

    Thursday, February 14, 2013 5:10 PM