none
Is it possible to create a Word template with VSTO that works also in Word 2007? RRS feed

  • Question

  • Hi,

    I almost finish to build a Word template project with VBA that needs to work in Word 2007, 2010, 2013, 2016.

    I was thinking to shift to VSTO, but in this page  I found that Document  Level Customization are possible only for Word 2010 or later..

    So if I use Visual Studio 2017 Community  my template will not work in word 2007 also if I use only objects, methods, etc, present in Word 2007?

    What are the pros and cons to shift to VSTO?

    Thanks, Lauro


    Tuesday, January 16, 2018 4:18 AM

Answers

  • Visual Studio 2010 had templates for Word 2007. If you have (or can get hold of) that version of Visual Studio then you'd have the template. Assuming your project doesn't use any Word features introduced after that version: A Word template (docx) developed for Word 2007 should continue to work in all later versions of Office. But you'd have to maintain it in VS 2010.

    FWIW you want to evaluate very carefully whether you want to switch to the VSTO technology. It has certain advantages (central code maintenance, customizable task panes, for example) but distribution and installation can be much more complex than what you're used to with VBA.


    Cindy Meister, Office Developer/Word MVP, <a href="http://blogs.msmvps.com/wordmeister"> my blog</a>

    • Marked as answer by Lauro2 Thursday, January 18, 2018 9:20 PM
    Tuesday, January 16, 2018 4:31 PM
    Moderator
  • Hi Lauro2,

    You had mentioned that, "you want to develop Word Template using VS Community 2017 and want to run in 2007 , 2010 , 2013 and 2016."

    It is possible to develop a VSTO Project with Latest version of Visual Studio that also work for Office 2007 and other newer versions of Office.

    You need to make sure that you are using .Net framework 3.5, 4 or higher.

    You also need to install Visual Studio 2010 Tools for Office Runtime on targeted machine.

    then it can run for Office 2007 and other versions.

    Reference:

    Running Solutions in Different Versions of Microsoft Office

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Lauro2 Thursday, January 18, 2018 9:22 PM
    Wednesday, January 17, 2018 3:09 AM
    Moderator

All replies

  • Visual Studio 2010 had templates for Word 2007. If you have (or can get hold of) that version of Visual Studio then you'd have the template. Assuming your project doesn't use any Word features introduced after that version: A Word template (docx) developed for Word 2007 should continue to work in all later versions of Office. But you'd have to maintain it in VS 2010.

    FWIW you want to evaluate very carefully whether you want to switch to the VSTO technology. It has certain advantages (central code maintenance, customizable task panes, for example) but distribution and installation can be much more complex than what you're used to with VBA.


    Cindy Meister, Office Developer/Word MVP, <a href="http://blogs.msmvps.com/wordmeister"> my blog</a>

    • Marked as answer by Lauro2 Thursday, January 18, 2018 9:20 PM
    Tuesday, January 16, 2018 4:31 PM
    Moderator
  • Hi Lauro2,

    You had mentioned that, "you want to develop Word Template using VS Community 2017 and want to run in 2007 , 2010 , 2013 and 2016."

    It is possible to develop a VSTO Project with Latest version of Visual Studio that also work for Office 2007 and other newer versions of Office.

    You need to make sure that you are using .Net framework 3.5, 4 or higher.

    You also need to install Visual Studio 2010 Tools for Office Runtime on targeted machine.

    then it can run for Office 2007 and other versions.

    Reference:

    Running Solutions in Different Versions of Microsoft Office

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Lauro2 Thursday, January 18, 2018 9:22 PM
    Wednesday, January 17, 2018 3:09 AM
    Moderator