Skip to content
  • Home
  • Work
  • About
  • Blog
  • Contact

Customising Contextual Ribbon Tabs In Visio 2010

John Goldsmith's profile image

John Goldsmith

30 June 2011
  • Code
  • Visio 2010

ContextualRibbonTabs

I’ve recently been transferring some old VBA ShapeSheet utilities over to a c# add-in for Visio 2010 and hit a problem when trying to add some custom groups to the ShapeSheet Design ribbon tab. Using Ribbon.xml, I was happily able to add groups to either custom tabs or built-in ones such as ‘Home’, but for love nor money couldn’t get anything to show in the ShapeSheet tab.

Chris Hopkins, from the Visio team, kindly set me straight and the solution was in understanding that not all tabs are created equal and that the ShapeSheet Design tab belongs to a set called Contextual Tabs…

Core or contextual

If you’re interested in the general workflow of adapting the ribbon in Visio 2010 then head over to the Customizing the Ribbon in Visio 2010 by Using a Visual Studio 2010 Add-In article on MSDN. What it doesn’t cover directly is the contextual tabs difference. A somewhat abstract hierarchy for Ribbon XML is as follows:

RibbonXml

…and as you can see contextualTabs are separate from the standard or core ‘tabs’ collection.

Visio’s contextual set

One very handy resource when dealing with Ribbon XML is a set of Excel spreadsheets that you can download highlighting all of the Office 2010 control ID’s (or relevant idMso). If you look at the Visio one you’ll spot that Visio has four contextual tabs sets:

  • TabSetContainerTools
  • TabSetInkTools
  • TabSetPictureTools
  • TabSetShapeSheetTools

The last one was the one I was after and so a fleshed out xml snippet (for the image at the top of this post) might look something like this:

ContextualTabElement

Anyway, I hope this helps out if you find your self scratching your head in the same way I did.

Further reading surrounding Visio ribbon customization, if you’ve not come across them already, includes:

  • User Interface Extensibility in Visio 2010 – Visio Insights
  • How to Run VBA Macros from a Ribbon Button in Visio 2010 – David Parker
Microsoft MVP Logo

John has been a Microsoft MVP, in the award categories of Visio and M365, since 2008.

Visio Blogs

  • Bill Morein (via Wayback Machine)
  • Chris Castillo (via Wayback Machine)
  • Chris Hopkins (via Wayback Machine)
  • David Parker
  • Eric Rockey
  • Jesse Phillips-Mead
  • John Marshall
  • Michel LAPLANE (FR)
  • Nikolay Belyh
  • Saveen Reddy (via Wayback Machine)
  • Visio Guy
  • Visio [Product] Blog
  • Visio Insights (via Wayback Machine)

Visio Resources

  • Developing Microsoft Visio Solutions
  • Visio Stencils at ShapeSource
  • Microsoft Visio YouTube Playlist
  • Visio (Product site)
  • Office 2010 Engineering
  • Visio 2016 SDK (Download)
  • Visio JavaScript API reference
  • VisioMVPs.org
Contact

visualSignals ltd
31 Riverview Grove
London, W4 3QL
United Kingdom

+44 (0) 208 078 9120

Around the Web

Copyright © visualSignals ltd 2025

Mastodon