Exposing add-in errors in VSTO for Word 2007

One of the most annoying things about writing add-ins for Office is that it tends to swallow any and all errors that occur. All exceptions are silently thrown into the trash heap without even a statusbar flag. Nothing. This meant that we often had to add messageboxes for debugging, or Debugger.Launch to see what’s going on.

At first I thought that Word 2007 was no different, but then I was idly browsing through the Word Options dialog and discovered a wonderful prize – a checkbox called “Show add-in user interface errors”. Quickly checked and lo and behold – exceptions in my code are shown by Word! Life is good again!

So in case you’ve missed it too (and it’s easy to miss), it’s under the Office/File menu -> Word (or Excel) Options -> Advanced:

 

Enjoy!

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.