Disabling


Automatic Disabling

MS Office can automatically disable add-ins that behave unexpectedly when they are being loaded.
An add-in might be disabled every time the application starts if it has caused problems or crashed.
It is very easy to re-enable an add-in that has been disabled
There are two types of automatic disablying that Office uses:
Hard Disabling - help > about > disabled items
Soft Disabling - com add-ins dialog box


Hard Disabling

When an add-in is loaded, code causes the application to close unexpectedly or when you stop the debugger before the startup event or constructor has completed.
This generally happens when the application closes unexpectedly.
In 2003 hard disablying will disable both the add-in and the AddInLoader.dll
in 2007 hard disablying will only disable the add-in
If the loader is disabled then no VSTO add-ins will be loaded (despite them being in different application domains)
The disabled add-in must be removed or reactivated before any other VSTO add-ins are loaded.


Soft Disabling

When an add-in is loaded there is an exception but the application does not close unexpectedly
Soft disablying changes the LoadBehavior registry entry to the value 2.
In 2003 soft disabling will only disable the solution add-in.
This generally occurs when an unhandled exception has occurred in the addins startup handler. The error must be corrected before reenablying
The add-in will appear in the COM Add-ins dialog box but will remain unticked.
SS - Not Loaded - A runtime error occurred during the loading of the COM Add-in.



© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext