Visio Guy

Visio Discussions => Programming & Code => Topic started by: Nikolay on February 05, 2011, 08:15:45 AM

Title: Enumerate all items in ribbon
Post by: Nikolay on February 05, 2011, 08:15:45 AM
How do I programmatically enumerate all commands/items/elements in the ribbon?

I mean, with CommandBars/UIObjects it was quite easy to do this.
But how do I do the same thing with the ribbon?

The only way I figured out is the Active Accessibility.
Maybe there is an easier approach?

What I want to do is to write an addin, which can be told to search the ribbon for a command by command name, if it's there, then highlight it, and if and if it's not there, then add it :)
Browser ID: smf (is_webkit)
Templates: 1: Printpage (default).
Sub templates: 4: init, print_above, main, print_below.
Language files: 1: index+Modifications.english (default).
Style sheets: 0: .
Hooks called: 45 (show)
Files included: 25 - 925KB. (show)
Memory used: 746KB.
Tokens: post-login.
Cache hits: 8: 0.00180s for 22,301 bytes (show)
Cache misses: 2: (show)
Queries used: 11.

[Show Queries]