none
VBA or .NET if one wants few prerequisites? RRS feed

  • Question

  • Hi,

    I'm making an add-in for Word 2007-2013 x86/x64 and want to have as few prerequisites as possible. I'm unsure of whether to use VBA or .NET for the add-in. The add-in itself isn't very complicated, it creates a group in the ribbon, saves some settings to a file and does searches and replacements based on the settings.

    Some questions:

    -If I make a 4.0 add-in for Word 2007/2010/2013, will the end-user be able to run it even if he/she hasn't manually installed the .NET 4.0 framework? Or will the user have to download the whole thing before being able to use the add-in?

    -If using .NET, one can should use 3.5 or 4.0 to be compatible with Office 2007, 2010 and 2013, right?

    Regards,
    SashT

    Thursday, July 11, 2013 6:48 AM

Answers

  • Hi SashT

    The fewest prerequisites would be a VBA template. That's self-contained and need only be copied to an appropriate folder.

    A VSTO add-in requires full installation, presence of the PIAs, the VSTO runtime and the correct version of the .NET Framework. In order to create an add-in that will run on the three versions of Office you mention, you require Office 2007 and Visual Studio 2005 SE, 2008 or 2010 with the Visual Studio Tools for Office (means a "high-level" edition of Visual Studio).

    If you have any version of Visual Studio prior to 2012 you could also use the "Shared Add-in" template to create a COM Add-in. But note this will require a SHIM that must also be installed (but you wouldn't need the VSTO runtime, in that case).

    Usually, you'd create a Set-up program that would take care of checking for and downloading/installing prerequisites.


    Cindy Meister, VSTO/Word MVP, my blog

    • Marked as answer by SashT Thursday, July 11, 2013 5:16 PM
    Thursday, July 11, 2013 4:56 PM
    Moderator

All replies

  • Hi SashT

    The fewest prerequisites would be a VBA template. That's self-contained and need only be copied to an appropriate folder.

    A VSTO add-in requires full installation, presence of the PIAs, the VSTO runtime and the correct version of the .NET Framework. In order to create an add-in that will run on the three versions of Office you mention, you require Office 2007 and Visual Studio 2005 SE, 2008 or 2010 with the Visual Studio Tools for Office (means a "high-level" edition of Visual Studio).

    If you have any version of Visual Studio prior to 2012 you could also use the "Shared Add-in" template to create a COM Add-in. But note this will require a SHIM that must also be installed (but you wouldn't need the VSTO runtime, in that case).

    Usually, you'd create a Set-up program that would take care of checking for and downloading/installing prerequisites.


    Cindy Meister, VSTO/Word MVP, my blog

    • Marked as answer by SashT Thursday, July 11, 2013 5:16 PM
    Thursday, July 11, 2013 4:56 PM
    Moderator
  • Hi Cindy,

    I have Visual Studio 2010 with the VSTO, so that part isn't a problem. I also managed to deploy the add-in with the set-up program you mentioned, and it works fine with Word 2010 and 2013.

    But now that you mention these other things I think I'll migrate the add-in to VBA. I didn't have a clue about how this whole .NET presence worked which is why I did it in VS in first place.

    Thanks!

    SashT

    Thursday, July 11, 2013 5:16 PM