News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

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.

AndyW

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.

:o
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 http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Barry

Andy,

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*.

Barry

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 184 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1124KB.
Tokens: post-login.
Cache hits: 13: 0.00151s for 26,715 bytes (show)
Cache misses: 3: (show)
Queries used: 17.

[Show Queries]