none
Outlook addins not loading when starting Outlook programmatically RRS feed

  • Question

  • Hello,

    When i start Outlook with the following line:

    app = new Microsoft.Office.Interop.Outlook.Application();

    it loads Outlook without any problems. The problem is that no addins are being loaded.

    When i start Outlook with a createprocess and hook to that instance the addins are loaded.

    I'm using Office 2010.

    I hope somone can explain to me why this happens.

     

     

     

    Tuesday, April 5, 2011 10:25 AM

Answers

  • Make sure that your AddIn doesn't requires an active Explorer.
    If you just create the application instance, there is no GUI at all.
    An external process may not require a GUI - like ActiveSync in older Versions.
    It's started when you connect a Device and runs in the Background.

    I would start to create a very simple AddIn that logs the startup event.

    Also put a try/catch in the startupmethod to see if you get an error there.

    Greets - Helmut


    Helmut Obertanner [http://www.x4u.de] [http://www.outlooksharp.de]
    Thursday, April 7, 2011 5:46 AM
    Answerer

All replies

  • Hi Jeroen667,

     

    Thanks for posting in the MSDN Forum.

     

    Did you use your snippet in a window form application?

     

    I’m try to reproduce your issue via following snippet.

    Outlook.Application olApp = new Outlook.Application();
    Outlook.NameSpace olSession = olApp.Session;
    Outlook.MAPIFolder olFolder = olSession.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox);
    Outlook.Explorer olExplorer = olApp.Explorers.Add(olFolder);
    ((Outlook._Explorer)olExplorer).Activate();
    

     

    And I found all of the add-ins were loaded as usual. Did I miss something?

     

    Have a good day,

     

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, April 7, 2011 5:16 AM
    Moderator
  • Make sure that your AddIn doesn't requires an active Explorer.
    If you just create the application instance, there is no GUI at all.
    An external process may not require a GUI - like ActiveSync in older Versions.
    It's started when you connect a Device and runs in the Background.

    I would start to create a very simple AddIn that logs the startup event.

    Also put a try/catch in the startupmethod to see if you get an error there.

    Greets - Helmut


    Helmut Obertanner [http://www.x4u.de] [http://www.outlooksharp.de]
    Thursday, April 7, 2011 5:46 AM
    Answerer
  • Sorry for the late reaction, have been on holidays for three weeks.

    Thanks for the input.

    Both of my addins are using the active explorer on startup complete to add some buttons to the commandbar.

    What should i do to add those buttons? (use NewExplorer of the Application.Explorers)

     

     

     

    Wednesday, April 27, 2011 1:01 PM
  • Before assuming that there is an ActiveExplorer() you can check for Explorers.Count and see if there's 1 or more Explorers. If not you can wait for NewExplorer() before creating your UI.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Jeroen667" <=?utf-8?B?SmVyb2VuNjY3?=> wrote in message news:7e97c2e9-7074-4e73-886a-491cdfcb84b4...

    Sorry for the late reaction, have been on holidays for three weeks.

    Thanks for the input.

    Both of my addins are using the active explorer on startup complete to add some buttons to the commandbar.

    What should i do to add those buttons? (use NewExplorer of the Application.Explorers)

     

     

     


    Ken Slovak MVP - Outlook
    Wednesday, April 27, 2011 1:26 PM
  • Hi,

    usually I'm using an ExplorerWrapper to handle Explorer events.

    Here is an explantation:

    http://msdn.microsoft.com/en-us/library/ff973716.aspx

    Hope this helps,

    Greets - Helmut


    Helmut Obertanner [http://www.x4u.de] [http://www.outlooksharp.de]
    Wednesday, April 27, 2011 1:28 PM
    Answerer