Word puts an add-in on the disabled items list for no reason

Add-in Express™ Support Service
That's what is more important than anything else

Word puts an add-in on the disabled items list for no reason
 
Kris Vynck




Posts: 14
Joined: 2009-04-01
We have created several add-ins for Word. It occurs frequently that a user contacts our helpdesk because one of the add-ins is no longer loaded. Removing it from the list of disabled items seems to solve the problem.
The users reporting the problem do not remember Word crashing when executing functions of the add-in.

* Why are our add-ins blacklisted by Word?
* Is there any way of telling Word the add-in should not be put in the
disabled list?
* Is there any way of avoiding the add-in from getting on the blacklist?
* Which criteria are used by Word to determine the add-ins is "dangerous"?
Posted 11 Jun, 2009 05:29:37 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Hello Kris,

Probably your add-in fires an exception at an inappropriate moment (say, at startup or shutdown) and Word blacklists it. There's no way to prevent this. I suggest debugging your add-in.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 11 Jun, 2009 08:04:09 Top
Kris Vynck




Posts: 14
Joined: 2009-04-01
Hello Andrei,

Thank you for your answer. Our add-ins do execute quite some code when they are started, which is in fact when Word starts up.

Unfortunately it's not easy to debug this problem since I can't seem to get the add-in blacklisted. I tried throwing an unhandled exception in the some event handlers of the add in, but the exception dialog of Add-In Express is displayed and Word continues to load.

Example:

private void AddinModule_AddinInitialize(object sender, EventArgs e)
{
throw new OverflowException();
}

I also tried "DocumentOpen", "WindowSelectionChange" and "DocumentChange".

Do you have any idea how I can make Word put my add-in on the disabled items list? In which event handler(s) should I fire an unhandled exception?
Does the macro security setting have an influence on this?

If I know where the exception occurs in the add-in, I can debug that piece of code and handle the exception properly.
Posted 11 Jun, 2009 11:42:33 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Hello Kris,

This was my assumption only. A while ago, I tried to make some Office application to blacklist my add-in but failed. Do you handle the OnError event of your add-in module? Also, you can try intercepting the AppDomain.UnhandledException event.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 11 Jun, 2009 12:31:12 Top