Disabled Addins

If an add-in fails when it is being loaded, Outlook can disable the add-in in one of two ways. The first way, known as hard disabling, is to disable the add-in and AddinLoader.dll, the loader that VSTO uses to load add-ins. If this loader is disabled, any add-in created by VSTO will also be disabled and cannot be loaded until the disabled add-ins are reenabled. Typically, hard disabling occurs when Outlook closes unexpectedly, but it can also occur if you manually stop the debugger when code in the Startup event is executing. Also, if you stop execution of your program when the Startup event handler code is running, you will most likely experience a hard disable of the add-in. You can reenable the add-in by clicking Enable in the Disabled Items list, which is found in the About Microsoft Outlook dialog box.

The second way Outlook disables an add-in is known as soft disabling. Outlook soft-disables the add-in when an unhandled exception occurs in the add-in's Startup event handler. You must first correct the error before you attempt to reenable the add-in; otherwise, the act of reen-abling will fail, and the add-in will remain disabled. You can reenable a soft-disabled add-in in the COM Add-ins dialog box. Let's take a look at both types of disabled add-ins.

0 0

Post a comment