1
votes

I have an annoying problem. I have a VSTO 2 plugin for Outlook 2003 (written with VS2005). I simply create 2 buttons that save email objects and work on emails.

The problem is that the plugin, when just installed, is loaded by outlook and it works, but when I reboot the plugin is no more automatically loaded. I must re-enable it from outlook's addin properties to see it again. If I reinstall the plugin after reboot, (most of the times) it is again automatically loaded (till next reboot).

What could be the problem?

1
Looks like an unhandled exception in your add-in. Outlook will disable the add-in in that case.Dirk Vollmar
i'm pretty sure there's no unhandled exception :/ at least not until i initialize the log. and in the case i don't see the addin ther's no log. so my guess is that outlook doesn't even try to load itp4bl0
Outlook probably doesn't try to load your add-in because it is already disabled due to a previously occurred exception. A way to debug this is to place a try/catch in all top-level methods and use System.Diagnostics.Trace to print the stack trace. Then use a tool like DebugView and you will possibly see what is going wrong.Dirk Vollmar

1 Answers

0
votes

The best way I have found to diagnose unhandled vsto exceptions is do the following:

-Open a command window -type in "Set VSTO_SUPPRESSDISPLAYALERTS = 1" -type in "VSTO_LOGALERTS = 1" run outlooks executable from its install location using the same command window. In this manner I found my issue with an excel add in (it pops up a window instead of eating the error)