Exposing add-in errors in VSTO for Word 2007

Tags: .NET, Office

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!

2 Comments

  • Jose Ayala said

    I got a trouble, each time that i try to install an add-in (built by myself) it doesnt add to the word 2007 add-ins because it doesn charge well and this failed in execution time (this was the error). But when I built my solution in .NET it works very well...can anybody help me???

  • trumaresponsebraincns said

    pediatricrehabilitationmarltonnj pediatricrehabilitationmarltonnj,advancednursepediatricpractitioners advancednursepediatricpractitioners,lostintranslationparty lostintranslationparty,whatkoreanmusicsoundslike whatkoreanmusicsoundslike,client-centeredtheraoywithdiversepopulations client-centeredtheraoywithdiversepopulations,prognosisofneardrowning prognosisofneardrowning,doelbelgie doelbelgie,whatkoreanmusicsoundslike whatkoreanmusicsoundslike,controlforredthreadinlawns controlforredthreadinlawns,whatislimeforlawns whatislimeforlawns,

Comments have been disabled for this content.