Visio 2010 Ribbons

Started by AndyW, December 03, 2009, 12:11:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


I thought I would give the Visio 2010 Beta a try.

My application does a lot of cutomisation and hiding of command bars etc. This no longer seems to work with the advent of ribbons. Anyone know if its possible to keep the old style in place of ribbons or do I have to completely rewrite the handling to cope with ribbons. (My application is built into a visio diagram plus VB dll and is not an add-in).

How do I maintain one version of my application that has to work across 2003 and 2007 if there are new functions etc to handle ribbons. Development of my application is on going but will have lots of customers who get updates that will not move from 2003 in the near future.

Live life with an open mind

Visio Guy

Hi Andy,

You can check Visio versions and make some decisions that way.

This doesn't work as well with VBA, because you can get the problem where the code won't "compile" in older versions, but if you have separate exes/dlls, etc. it should work. I'm sure there are some finer wrinkles that I haven't thought of, but at least app.Version is a place to start.
For articles, tips and free content, see the Visio Guy Website at
Get my Visio Book! Using Microsoft Visio 2010



Since your addon is VBA-based, you can take advantage of the new 'Document.CustomUI' property.  Stuff your Ribbon customizations into this property (it's a RibbonX XML string), save the file, then reopen it.  Visio 14 will apply the customizations whenever the document is active.  Previous versions naturally will ignore this property and still expect you to use the CommandBars or UI Object Model to plug in your UI.  You then just need to wrap your commandbar-based code with an app version check as mentioned earlier.

Note: the Document.CustomUI property is very picky.  If you get anything wrong in the XML, *none* of your customizations will appear.  Also remember that after setting Document.CustomUI, you must save and reopen the file to see the customizations.  Visio applies them at doc open time *only*.