Ribbon extensibility for Visio Solutions in Visio 2010


Yesterday Microsoft announced the availability of the BETA for Visio 2010.  If you have not seen my blog post on this click here and download your copy of the BETA today.

Today I want to share with you a guide that I developed which walks you through the process for adding a Ribbon based UI to your VSTO based add-ins.  I also want to share with you a set of sample add-ins which incorporate my best practices for working with ribbons in Visio based add-ins.

This guide will also point out that you are now able to provide support for both CommandBars and Ribbons in the same add-in so that it can be used in either Visio 2007 or Visio 2010.  Of course this requires that you not make use of any new Visio 2010 APIs, including the new Application.RegisterRibbonX() method which allows you to add a document level ribbon.

My source code samples include:

  • Application Level sample showing how to add a tab to the ribbon no matter what document is active.  This includes enabling and disabling items on the ribbon tab based on the active document.
    • This also includes a sample showing how to add a tab to the File tab view.

 

  • Document Level sample showing how to add a tab to the ribbon for a specific document so that it will only be visible/accessible if that document is the active document.
    • This also includes a sample showing how to add your own menu items to the right-click shape menu.

 

  • VBA sample that demonstrate how you can use RibbonX with a VBA based solution.

For additional documentation on ribbon extensibility refer to these sites:

Backstage extensibility in Office 2010 – This article is a high level overview showing the level of customization that can be accomplished with RibbonX in Office 2010 applications, including Visio 2010 😉

Extending the interface in Outlook 2010 – This article is based on Outlook but has many RibbonX samples for various interface items.

Using RibbonX with C++ and ATL – If you are not using .NET take a look at this.

Ribbon samples for Visio.zip