none
script to automate re-enabling outlook add-in for the user? RRS feed

  • Question

  • We have an Outlook form region installed on each client workstation as an add-in, and whenever their Office application crashes, it prompts the user to disable their add-ins which they click "Yes" without reading much further into it, which in effect causes the custom contact form to resort back to the default one.

    Is there any way, perhaps done in a script, where when they open Outlook, it could check if the add-in is unchecked or disabled, and simply reenable it?

    Monday, July 1, 2013 4:50 PM

Answers

  • Reading ComAddIn.Connect and setting it True if False would work for any addin not disabled, even if it was registered in HKLM. That's the case for all versions of Outlook.

    The thing to be aware of if it's a shared addin being started that  OnStartupComplete() won't fire unless it's explicitly called, and that MAPILogonComplete() will have fired already.

    I usually check in OnConnection() for something like this:

    if (connectMode != Extensibility.ext_ConnectMode.ext_cm_Startup)

    and call OnStartupComplete() if there's code in that handler I want executed.


    Ken Slovak MVP - Outlook

    Monday, July 8, 2013 8:47 PM
    Moderator
  • If the addin is disabled, it will be listed in this key:

    HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Resiliency\DisabledItems

    You can try to parse the binary value and remove it without touching any other add-ins that may be in the value, otherwise it's usually easier to just delete the key. However, you'd have to restart Outlook.

    To load it on demand if it's not loaded (and if the add-in is registered to support loading on demand), you can loop through the Application.COMAddIns collection to inspect the COMAddin objects, match your add-in against the .ProgId value and set Connect = True.  You'd of course need another add-in to run this code, or use a VBA macro.


    Eric Legault (MVP: Outlook)
    About me...
    Outlook Appins: Store Social Media fields in your Outlook Contacts!

    Tuesday, July 2, 2013 4:27 PM
    Moderator
  • Yup, that would work.  Except for Outlook 2007 and earlier I believe, IF the add-in is registered in HKLM (all users) instead of HKCU (current user).

    Eric Legault (MVP: Outlook)
    About me...
    Outlook Appins: Store Social Media fields in your Outlook Contacts!

    Monday, July 8, 2013 6:28 PM
    Moderator

All replies

  • If the addin is disabled, it will be listed in this key:

    HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Resiliency\DisabledItems

    You can try to parse the binary value and remove it without touching any other add-ins that may be in the value, otherwise it's usually easier to just delete the key. However, you'd have to restart Outlook.

    To load it on demand if it's not loaded (and if the add-in is registered to support loading on demand), you can loop through the Application.COMAddIns collection to inspect the COMAddin objects, match your add-in against the .ProgId value and set Connect = True.  You'd of course need another add-in to run this code, or use a VBA macro.


    Eric Legault (MVP: Outlook)
    About me...
    Outlook Appins: Store Social Media fields in your Outlook Contacts!

    Tuesday, July 2, 2013 4:27 PM
    Moderator
  • I would probably need to perform as a startup VBA macro or whichever replicates the following task:

    File, Options, Add-Ins, Manage COM Add-ins <click GO>, toggle to checked for Add-Ins available called "Rolodex Reading Pane View"

    Monday, July 8, 2013 3:31 PM
  • Yup, that would work.  Except for Outlook 2007 and earlier I believe, IF the add-in is registered in HKLM (all users) instead of HKCU (current user).

    Eric Legault (MVP: Outlook)
    About me...
    Outlook Appins: Store Social Media fields in your Outlook Contacts!

    Monday, July 8, 2013 6:28 PM
    Moderator
  • Reading ComAddIn.Connect and setting it True if False would work for any addin not disabled, even if it was registered in HKLM. That's the case for all versions of Outlook.

    The thing to be aware of if it's a shared addin being started that  OnStartupComplete() won't fire unless it's explicitly called, and that MAPILogonComplete() will have fired already.

    I usually check in OnConnection() for something like this:

    if (connectMode != Extensibility.ext_ConnectMode.ext_cm_Startup)

    and call OnStartupComplete() if there's code in that handler I want executed.


    Ken Slovak MVP - Outlook

    Monday, July 8, 2013 8:47 PM
    Moderator
  • So the actual answer to the question here is NO, NO THERE IS NO SCRIPT TO RE-ENABLE A DISABLED PLUGIN.  THe ones that get disabled FLIPPIN CONSTANTLY because of programmers that do nmot problem solve the way Americans do.  Programmers that do not understand business.  Microsoft is tiring.
    Wednesday, August 17, 2016 11:50 AM