Search code examples
ms-wordvstooffice-addinsvisual-studio-2022word-addins

How to create an Office 2010 Add-in in 2022?


I am trying to create an Office add-in, mainly for Word, that consists of a simple Task Pane that displays search results from a website. I need it to work in every version of office, as far back as Office 2010. So I have chosen to create it in VSTO, as that seemed to be the most backward compatible approach. My problem is I don't have Word 2010, 2013, 2016, 2019, etc, to test that the add-in works in them, nor do I have any idea of how to build the add-in for backward compatibility in the first place.

I've searched through countless tutorials, Microsoft docs, Stack Overflow answers. I'm stuck. I know it's technically possible because the Grammarly add-in works in Office 2007 thru 2021/365.

Is it even possible for a little dev like me to create an add-in for Word 2010 in 2022?

I am using Visual Studio 2021.


Solution

  • As far as I know Grammarly uses a shimmed COM add-in skeleton (most probably written in C++) which implements the IDTExtensibility2 interface. But VSTO does this for you out of the box by hiding all the complexity COM add-ins could have on board.

    Is it even possible for a little dev like me to create an add-in for Word 2010 in 2022?

    Yes, of course. It is not necessarily to create C++ COM add-ins, you can easily start creating VSTO add-ins for that. You just need to choose the right .net framework version for that.

    The Run solutions in different versions of Microsoft Office article shows Office versions that can be supported by your add-in created with Visual Studio 2022 or earlier and target .net frameworks that can be used for that. Depending on the .net framework chosen you can support different ranges of Office application versions, in short.

    The Visual Studio Tools for Office Runtime page lists the VSTO Runtime releases and the corresponding version of Office for which its support lifecycle follows. The Visual Studio 2010 Tools for Office Runtime (VSTO Runtime) ships with various versions of Visual Studio and Microsoft Office and follows the support lifecycle of the parent product. It is recommended that developers install the latest version of the VSTO Runtime with their applications. It will be supported when running with supported versions Office. If the VSTO Runtime needs to be serviced, only the latest version will be updated.