none
does word2013 addin can working in word2010? RRS feed

  • Question

  • i developer a addin for word2013, but i want this addin compatible for word2010, how can i do it?

    does i need create two diff project from each template in vs2013, and these two project with the exactly same code?

    Saturday, March 8, 2014 6:12 AM

Answers

  • Hello sendreams,

    There is no need to create separate projects nowadays. You just need to use Visual Studio 2010 Tools for Office Runtime and choose .Net Framework 4 or 4.5. Please take a look at the Running Solutions in Different Versions of Microsoft Office article in MSDN. It describes all aspects for supporting multiple Office/Word versions in one add-in.

    Note, when you create a new Office project, Visual Studio automatically adds references to the Microsoft Office primary interop assemblies (PIAs) that are required to build your project. If you want to support older Office versions you need to replace PIAs with ones that correspond to the old Office version - Word 2010 in your case. See How to: Target Office Applications Through Primary Interop Assemblies.

    Finally, if the project targets the .NET Framework 4 or the .NET Framework 4.5, the Embed Interop Types property for the assembly reference is set to True by default. By using this setting, your solution does not require the PIA on end-user computers. For more information, see Designing and Creating Office Solutions.

    • Marked as answer by sendreams Monday, March 10, 2014 3:08 AM
    Saturday, March 8, 2014 7:18 AM

All replies

  • i found the solution for this perpose, 

    just replace the "Microsoft.Office.Interop.Word.dll" use corresponding version, for 2010, user the "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Visual Studio Tools for Office\PIA\Office14\Microsoft.Office.Interop.Word.dll", than 2013 use the "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Visual Studio Tools for Office\PIA\Office15\Microsoft.Office.Interop.Word.dll"

    this sound good for me, but need a long time test.

    other reference dll in the some folder:


    • Edited by sendreams Saturday, March 8, 2014 7:12 AM
    Saturday, March 8, 2014 7:02 AM
  • Hello sendreams,

    There is no need to create separate projects nowadays. You just need to use Visual Studio 2010 Tools for Office Runtime and choose .Net Framework 4 or 4.5. Please take a look at the Running Solutions in Different Versions of Microsoft Office article in MSDN. It describes all aspects for supporting multiple Office/Word versions in one add-in.

    Note, when you create a new Office project, Visual Studio automatically adds references to the Microsoft Office primary interop assemblies (PIAs) that are required to build your project. If you want to support older Office versions you need to replace PIAs with ones that correspond to the old Office version - Word 2010 in your case. See How to: Target Office Applications Through Primary Interop Assemblies.

    Finally, if the project targets the .NET Framework 4 or the .NET Framework 4.5, the Embed Interop Types property for the assembly reference is set to True by default. By using this setting, your solution does not require the PIA on end-user computers. For more information, see Designing and Creating Office Solutions.

    • Marked as answer by sendreams Monday, March 10, 2014 3:08 AM
    Saturday, March 8, 2014 7:18 AM
  • hi, Eugene 

    thank you very much

    i have solved this problem, your reference article is very useful.

    thanks

    Monday, March 10, 2014 3:08 AM