Ribbon button to trigger sub in a different diagram

Started by AndyW, October 26, 2011, 01:13:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AndyW

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.
Live life with an open mind

Jumpy

Shouldn't the hidden diagramm/document(?) create the new menu?

AndyW

#2
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.
Live life with an open mind