How to add Macros/VBA code as default in Visio 2013?

Started by Venkatesh, November 28, 2013, 03:16:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Venkatesh

Hello All,

I have developed a Macro (A VBA code) in Visio 2013 to avoid some repeated work.
But if i try to put this Macro in some other Visio file, i need to add it manually (Copy the VBA code and paste it).

Is there any way to make this Macro/VBA code available on all Visio file by default..? Means, even if i open an New visio file, i need this Macro/VBA code into it as default.

I hope i am clear with my question. Please help me out with detailed steps.

Thanks in advance.
Venkatesh

Jumpy

You could place the code in a drawing. Save that as a template. Now the code is available in every new drawing, based on that macro.

As there is in Visio no thing as the Normal.dot in Word, you can't make the macro available for everything.

Venkatesh

This method I have tried...But macro will not be available if I open vsd file out of this template, means new visio file..
Is it really not possible to address my concern.....?? :-\

Jumpy

I can't imagine why? Code placed in a template should normally be available in all drawings based on that template. (The drawings have naturally to be made after the template is altered in this way). The code is not available in older drawings!

Another thing you could think about: If you use a certain stencil in all of your drawings, you could place the code in the macro modul of the stencil. Now the code is available in every drawing that uses that stencil. The older drawings, too.

Paul Herber

I have another way to do this ...
Put your code in a stencil
Using my Super Utilities for Visio http://www.sandrila.co.uk/visio-utilities/, use the menu
SuperUtils -> Stencil -> Manage startup stencils
and add this stencil to your startup list.

Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

Venkatesh

@Jumpy: Can u please explain me with detailed steps..??

Venkatesh

@Paul Herber :

Any other options..? How i can insert an VBA code in stencil..?