Cannot debug or run Word AddIn because the required version of Microsoft Office is not installed

后端 未结 3 652
無奈伤痛
無奈伤痛 2020-12-24 05:18

I need to work on an existing Word 2007 addIn project that\'s a part of a MSVS 2008 solution. However, when I try to debug the addIn, I get the following error message: &quo

相关标签:
3条回答
  • 2020-12-24 05:45

    I had the same issue, I changed the officeversion attribute & I had to install office 2010 with the currently installed office 2013

    0 讨论(0)
  • 2020-12-24 05:47

    For the benefit of searchers, I hit this error in Visual Studio despite referencing the correct version in the section mentioned by @sdds.

    For me the fix was:

    1. Go to the project properties in visual studio
    2. Go to the 'Debug' tab
    3. Click the 'Start External Program' radiobutton
    4. Enter the path to the Office Application e.g. C:\Program Files\Microsoft Office 15\root\office15\winword.exe
    5. Run the project.
    0 讨论(0)
  • 2020-12-24 05:52

    Apparently, when the addin project is created, debug information such as the MS Office version and the executable path used for debugging is saved in the .CSPROJ file.

    So debug is not guaranteed to work on another machine.

    This information is saved in following XML node of the project file:

    ProjectExtensions \ VisualStudio \ FlavorProperties \ ProjectProperties

    In my case, the problem was in the attributes

    • OfficeVersion="14.0"
    • DebugInfoExeName="#Software\Microsoft\Office\14.0\Word\InstallRoot\Path#WINWORD.EXE"

    Changing 14.0 to 12.0 (2010 to 2007) in their values solved my problem.

    Check out these questions for reference:

    • Determine Excel 2007 addin vs excel 2010 addin
    • convert an Excel 2010 addin to a 2007 addin (both VSTO)
    0 讨论(0)
提交回复
热议问题