because the required version of the Microsoft Office application is not installe

abstracted from
"http://blogs.msdn.com/b/vsto/archive/2008/03/20/developing-an-add-in-for-multiple-versions-of-office.aspx"

Theoretically, you can develop an add-in for multiple versions of Microsoft Office by catering to the lowest common denominator. This means if you use an Excel 2003 add-in template in Visual Studio 2008, you would be able to develop and debug this with Excel 2007. However if you try this, you may meet these error messages: "You cannot debug or run this project, because the required version of the Microsoft Office application is not installed.", followed by "Unable to start debugging."

You can develop an Office 2003 add-in but use the 2007 Microsoft Office system for debugging. The following procedure demonstrates how to update your Visual Studio debugging options to use Microsoft Excel 2007 to debug an add-in targetting Microsoft Excel 2003.

1. On the Project menu, click on ProjectName Properties.

2. Click on the Debug tab.

3. In the Start Action pane, click the Start external program radio button.

4. Click the file browser button and navigate to %ProgramFiles%\Microsoft Office\Office12.

5. Choose Excel.exe and click Open.

6. Press F5 to debug your add-in.

猜你喜欢

转载自mssp.iteye.com/blog/2209064