Custom button for stencil macro

Started by Miki, November 20, 2014, 04:06:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Miki

Hi,
I was recently introduced to Visio and I am trying to drink from a fire hose. That being said, I am also trying to explore different visio magic.
I have a macro enabled stencil and it is used by more than one person when creating layouts. When we have to run that macro, it is a 4 step process. Click view macro button > select the stencil > select macro (as we have 2 macros in one stencil)> click run.
I want to reduce this four step process to one by placing a custom button on our quick access toolbar. Does anyone have any idea on how to do this? Or has anyone tried it?
I tried recording a macro for he above mentioned four steps. But I think microsoft does not allow to record a macro for running a macro.
Thanks for the help in advance!!!

- Miki Gajjar

Yacine

#1
If you don't mind using a quick and dirty way, try the following.
Set up a master that is deleted as soon as it is dropped on the page, then calls the desired macro.

Disadvantage, this is not an obvious way to show that an action is associated with the shape. For a smaller user group an acceptable compromise.
Big advantage: you can store your macros as snippets without having to think about the whole system (starting from a proper template, ...)


Serious solutions require a little bit more programming.


I enclose also an example stencil, where this behavior is implemented.
Yacine

Miki

@Yacine,
Yes, it is a crude but a quick way. I tried your method and it works well.

I also tried another method by creating a command button and calling the macro. Though this becomes a local method and is only limited to that particular file. I am still trying to find a way to add this command button to toolbar. If anyone comes across any useful tip it will be greatly appreciated.
Till then I'll work with Yacine's trick. Thanks for that Yacine!  :)