Visio Guy

Visio Discussions => Visio 2010 Issues => Topic started by: AndyW on October 26, 2011, 01:13:21 PM

Title: Ribbon button to trigger sub in a different diagram
Post by: AndyW on October 26, 2011, 01:13:21 PM
My Visio automation has 2 diagrams open, a hidden one containing all the code and a user diagram. My hidden diagram opens a form allowing the user to open their diagram. This works fine with 2003/2007 with command bars. I'm now looking at converting to use the ribbon, I added some XML to customui the users diagram. I can then have my ribbon appear. However, I only seem to be get the onAction etc from the ribbon to trigger a sub in the user diagram. Is there anyway I can call a sub in a different diagram (project), i.e. my hidden diagram. And I cannot reference my hidden diagram (project) from the user diagram.

The joys of trying for a single application across 2003/2007 and 2010.
Title: Re: Ribbon button to trigger sub in a different diagram
Post by: Jumpy on October 26, 2011, 02:10:04 PM
Shouldn't the hidden diagramm/document(?) create the new menu?
Title: Re: Ribbon button to trigger sub in a different diagram
Post by: AndyW on October 26, 2011, 02:29:30 PM
My hidden diagram currently adds the ribbon XML to the customui of the user diagram. If I add the ribbon XML to the customui of my hidden diagram, then this is not seen only the ribbon of the user diagram.

I was trying to avoid use of the RegisterRibbonX mechanism to keep the same code regardless of which version of Visio. I believe if I use this I would need to produce a different version of my application for 2010.