Debug & run microsoft word 2010 addin in office 2007

asteven used Ask the Experts™

I'm currently developing a 2010 word addin and it runs well using office 2010. However I also need this addin to be able to debug & run in office 2007, is there any way to do it?

In this 2010 word add-in I already target the .Net framework 4.0

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
If you embed the PIA i.e. in the reference properties for the interops (Microsoft.Office.Interop.Word, Office etc), set the Embed Interop Type property to True then the add-in will also work when installed on an Office 2007 machine. You will need to test it thoroughly as there are 1 or 2 minor incompatibilties between the 2 versions. To debug on a development machine with Office 2007 installed, go to the project properties' debug tab in Visual Studio, select Start External Program and browse to Winword.exe in the Program Files folder for Office 2007.

Hope that helps.

Xenacode Ltd
One more alternative is to use .Net Instrumentation techniques. Make use of Diagnostics.debugger.break() statement to start debugging wherever you want. Make sure that you have attached your execution to a process as mentioned in above answer.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial