none
Is there any good way to recover hard-disabled Outlook add-in programtically? RRS feed

  • Question

  • Recently we are developing a VSTO 4.0 Outlook Add-in, the main function for this add-in is do some security checks while end-user sending email, because of that, we need to make sure the add-in run all the time when end-user using Outlook.

    However, add-in could be hard disabled under some circumstances, like due to unhandled exceptions in the code, user close-off Outlook while loading the add-in, or user maually disable the add-in!

    So, in order to let the add-in always run there, can anyone give me some directions or suggestions for recover the disabled add-in problematically? What I am thinking is build 2 add-ins, and let one keep monitoring another one, in case one die another one can help to enable. Is this idea workable? Any suggestion is highly appreciated!


    Henry Y. Cheung

    Thursday, May 16, 2013 3:02 PM

Answers

  • If an addin is disabled due to unhandled exceptions or bad code your other code could constantly read the Connect bit state of the addin and delete the registry key for resiliency. However as Outlook has to be exited and restarted to re-enable the addin that presents a problem. In addition, if you have unhandled exceptions or bad code it would constantly being disabled, the user would never get any work done as Outlook would contantly have to be restarted. Why not just write code that handles exceptions properly?

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "Henry Y. Cheung" <=?utf-8?B?SGVucnkgWS4gQ2hldW5n?=> wrote in message news:eaf9ade4-ef9e-479e-82b6-a3ad1e70420c...

    Recently we are developing a VSTO 4.0 Outlook Add-in, the main function for this add-in is do some security checks while end-user sending email, because of that, we need to make sure the add-in run all the time when end-user using Outlook.

    However, add-in could be hard disabled under some circumstances, like due to unhandled exceptions in the code, user close-off Outlook while loading the add-in, or user maually disable the add-in!

    So, in order to let the add-in always run there, can anyone give me some directions or suggestions for recover the disabled add-in problematically? What I am thinking is build 2 add-ins, and let one keep monitoring another one, in case one die another one can help to enable. Is this idea workable? Any suggestion is highly appreciated!


    Henry Y. Cheung


    Ken Slovak MVP - Outlook
    Friday, May 17, 2013 6:05 PM
    Moderator