views:

139

answers:

2

Hello, I Have a problem with my custom Addin to word because sometimes, MS Word was disabled my addin, and I need to write another AddIn, which Was enabled to turn - on/off my first AddIn. Is it possible?

sorry for my English :(

A: 

What kind of add-in technology are you using? VSTO? What version of Office are you using?

In general it is possible to do what you want. However, the reason that Office disables add-ins is that the add-in threw an unhandled exception. In that case Office will set the LoadBehavior value in the Registry to 2.

Maybe it would be better to analyze and handle the underlying problem causing the exception.

Regards, divo

0xA3
+1  A: 

I agree with divo, your first step would be to add some exception handling/logging in order to prevent the addin from being disabled. You can also refer to this article

Debugging in Application-Level Projects

However, I have also had issues with the addin somehow becoming disabled without throwing any exception. If the above approaches do not work you can always go and have another program forcibly set the LoadBehavior of your addin from 2 to 3, which should re-enable it.

Jacob Adams