none
One Word Re-Purpose Addins for 2007, 2010 and 2013 RRS feed

  • Question

  • I have had to create a re-purpose addin for each version of Word (one one for 2007, one for 2010 and it appears I will need to create a separate one for Word 2013. Is there a technique to create one re-purpose Word addins that will work with Word 2007, 2010, and 2013 and future ones?  The only standard ribbon commands my addins re-purpose are SAVE and SAVEAS. Thank you.
    Tuesday, January 29, 2013 4:32 PM

Answers

  • Hi Jim

    Theoretically, if you create your add-in using the .NET Framework 4.0 (which means VS 2010 or later) your add-in becomes version-independent if you choose to "embed the interop types" so that the Add-in does not work directly with the installed PIAs.

    Also, an add-in created for Word 2007 can be installed in a newer version and will theoretically work.

    The catch occurs when functionality changes. And in the case of the SaveAs command, there's a problem with Word 2013. See:
      http://blogs.msmvps.com/wordmeister/2012/10/01/backstage-wordvba

    Even though it contains "VBA" in its title, the information is valid, generally, as far as re-purposing this command goes. And since Word 2007 does not support the Backstage, one of the possible approaches - creating your own Backstage customization - can't be used in Word 2007. But it is possible to set up your add-in to dynamically load different Ribbon XML, depending on certain criteria (version of Word).


    Cindy Meister, VSTO/Word MVP, my blog

    Tuesday, January 29, 2013 6:18 PM
    Moderator

All replies

  • Hi Jim

    Theoretically, if you create your add-in using the .NET Framework 4.0 (which means VS 2010 or later) your add-in becomes version-independent if you choose to "embed the interop types" so that the Add-in does not work directly with the installed PIAs.

    Also, an add-in created for Word 2007 can be installed in a newer version and will theoretically work.

    The catch occurs when functionality changes. And in the case of the SaveAs command, there's a problem with Word 2013. See:
      http://blogs.msmvps.com/wordmeister/2012/10/01/backstage-wordvba

    Even though it contains "VBA" in its title, the information is valid, generally, as far as re-purposing this command goes. And since Word 2007 does not support the Backstage, one of the possible approaches - creating your own Backstage customization - can't be used in Word 2007. But it is possible to set up your add-in to dynamically load different Ribbon XML, depending on certain criteria (version of Word).


    Cindy Meister, VSTO/Word MVP, my blog

    Tuesday, January 29, 2013 6:18 PM
    Moderator
  • Thank you Cindy. I did not see your reply to this Word question because I must not have checked the alert box on this question whereas I did on the Excel forum.
    Monday, February 4, 2013 3:01 PM
  • I am using the following to repurpose the Word SaveAs and Save events via the the XML which has worked fine for Word 2007 and 2010 but appears not to work for 2013.

    <?xml version="1.0" encoding="UTF-8"?>
    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="Ribbon_Load">
      <commands>
        <command idMso="FileSaveAs" onAction="CustomWordFileSaveAs" />
        <command idMso="FileSave" onAction="CustomWordFileSave"/>
       </commands>
    </customUI>

    • Edited by JimBassett Tuesday, March 12, 2013 6:35 PM
    Tuesday, March 12, 2013 6:33 PM