Add-in Express vs. Visual Studio Tools for Office
Almost four years to this day, I wrote about the new Visual Studio Tools for Office (VSTO) available in the latest release of Visual Studio 2008. I’ve also later posted an update that I’ve found a much more efficient way of developing for Microsoft Office; and that way was of course Add-in Express!
The rest is history and I’ve since had tons of fun developing Microsoft Office add-ins with Add-in Express and also working closely with this amazing team.
You might be thinking “Why do I need Add-in Express? I get the tools I need for Office development with Visual Studio.” Yes, you do get the tools needed for Microsoft Office development with Visual Studio 2010 or VS 2012, but comparing the two is like comparing driving a nail into a piece of wood with either a hammer or a wrench. With the wrench you’ll eventually get the nail into that piece of wood which will take a lot of time and maybe missing the nail and hitting your finger a few times but it’ll work. Whereas with the hammer, driving the nail into that piece of wood will be quick, although you might still miss and hit your finger.
It all comes down to getting the job done as quickly and as painlessly as possible and there are a few things to consider. How easy is it to create an add-in that will target multiple versions of Office? Can I create complex ribbons without a fuss and without –gasp- XML!?! How easy it is to deploy my add-in? Can I easily add my own items to the Office 2010 Backstage view?
- Developing for multiple versions of Office 2003 to 2013
- Developing for multiple Office applications
- Office Ribbon customization
Let’s imagine we want to write a Microsoft Office Add-in that targets primary users of Office 2013, 2010 and 2007. However, there are also a number of customers running Office 2003. Immediately this would be a problem when using VSTO. If all the developers on your team use Visual Studio 2010 or 2012, they now suddenly need Visual Studio 2008 or 2005 in order to develop for Office 2003 because Visual Studio 2010 only supports Office 2007 and 2010 when developing with VSTO.
One possible solution would be to create one add-in for Office 2003 in VS 2008 and another for Office 2007-2010 in VS 2010. This will definitely cause a lot of headaches since from the get-go your team will not be working from the same codebase.
If you want to create an add-in that will target for example both Microsoft Word and Excel with VSTO, you would have to create two separate projects in Visual Studio. One would be an Excel 2010 Add-in project:
The other a Word 2010 Add-in project:
Once again, you will be forced to work on more than one codebase. Imagine the complexity if you had to create an add-in that has to work in in both Excel and Word as well as in Office 2003 to 2013?
VSTO does offer two ways to create your own Ribbon tabs or customize existing tabs in Office 2007, 2010 and 2013. You can either add a Ribbon (Visual Designer) Item to your project which allows you to:
- Add custom or built-in tabs to a Ribbon
- Add custom groups to a custom or built-in tab
- Add custom controls to a custom group
- Add custom controls to the Microsoft Office menu
If you want to customize the Ribbon in a way that is not supported by the Ribbon (Visual Designer) item you need to use the Ribbon (XML) item. You use this Visual Studio item when you want to:
- Add built-in groups to a custom tab or built-in tab
- Add built-in controls to a custom group
- Add custom code to override the event handlers of built-in controls
- Customize the Quick Access Toolbar
- Share Ribbon customization between add-ins using a qualified ID
Of course as the name suggests, this would involve a lot of XML. Personally I hate having to design UI elements with XML. The room for error or typing mistakes are just too big and not to mention the fact that it takes a lot of trial and error to get your design just right.
In my next few articles, I’ll walk you through accomplishing the tasks I’ve mentioned above as well as a few others using VSTO and then show you how to do the same using Add-in Express. No prizes for guessing which one will be the quickest and easiest : )
Keep watching this space!
Last updated: 5-Feb-2013
Add-in Express vs. VSTO:
- Part 1: Add-in Express vs. Visual Studio Tools for Office
- Part 2: Version neutrality for your Office 2013-2000 extensions
- Part 3: Visual designers for Office Ribbon UI customization
- Part 4: Backstage View and context menu visual designers
- Part 5: Outlook regions
- Part 6: Custom Office task panes
- Part 7: Office add-in deployment
- Part 8: Microsoft Office developer happiness