none
Outlook 2010 Add-In VSTO C# - Add-In Disable / Enable events in Outlook RRS feed

  • Question

  • Is there a way to handle or detect the Disabling / Enabling of a add-in, from with in the add-in. 

    Friday, March 14, 2014 12:45 PM

Answers

  • Hello Raghunathan,

    VSTO (nor Outlook) doesn't provide any specific events when the add-in is disabled/unloaded at runtime. However, you may try to check the LoadBehavior windows registry key:

    A value that specifies when the application attempts to load the add-in and the current state of the add-in (loaded or unloaded). By default, this entry is set to 3, which specifies that the add-in is loaded at startup. For more information, see LoadBehavior Values.

    See Registry Entries for Application-Level Add-Ins for more information.

    Note, the Outlook object model provides access to the list of Outlook add-ins. The COMAddinIns property of the Application class returns a collection that represents all the Component Object Model (COM) add-ins currently loaded in Microsoft Outlook.

    Friday, March 14, 2014 3:17 PM

All replies

  • Are you trying to disable some other addin or yours? In the latter case, why not just make your addin do nothing?

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

    Friday, March 14, 2014 1:09 PM
  • Hello Raghunathan,

    VSTO (nor Outlook) doesn't provide any specific events when the add-in is disabled/unloaded at runtime. However, you may try to check the LoadBehavior windows registry key:

    A value that specifies when the application attempts to load the add-in and the current state of the add-in (loaded or unloaded). By default, this entry is set to 3, which specifies that the add-in is loaded at startup. For more information, see LoadBehavior Values.

    See Registry Entries for Application-Level Add-Ins for more information.

    Note, the Outlook object model provides access to the list of Outlook add-ins. The COMAddinIns property of the Application class returns a collection that represents all the Component Object Model (COM) add-ins currently loaded in Microsoft Outlook.

    Friday, March 14, 2014 3:17 PM