Author Topic: making macros more available  (Read 3320 times)

0 Members and 1 Guest are viewing this topic.

dtallent

  • Jr. Member
  • **
  • Posts: 52
making macros more available
« on: March 24, 2017, 10:46:00 AM »
I am using a macro while working on a blueprint. Is there a way to save this macro so that I can use it on another blueprint without having to create an entirely new macro for every blueprint?

Surrogate

  • Hero Member
  • *****
  • Posts: 1438
    • ShapeSheet™ Knowledge Base
Re: making macros more available
« Reply #1 on: March 24, 2017, 01:46:59 PM »
What you mean as blueprint ?

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4159
  • Ideas Visio-lized into solutions
Re: making macros more available
« Reply #2 on: March 24, 2017, 04:30:30 PM »
Begging the question that Surrogate raised, rather, assuming your just talking about macros that you wrote for a Visio file that your working on, and now want them to be more universally available.  There are a variety of ways:

1.) After you have working macros you can go to the VBA window and do either:
      a) select each macro individual, go to File > Export.  Pick a directory to place the file, give it a name and save.  Do for each macro.
     b) in the project drawing window (show tree structure), select, e.g., ThisDocument, and do export.  This will export all of the macros at once. 
     c) to retrieve the macro(s), do import.  Note, these are typically .cls files.  Method a lets you chose individual macros; method b you get all of them.

2.)  Add the macros to the stencil containing your shapes.  The macros will travel with the stencil.

3)  Save your file as a template.  All of your settings will load up.

That's it in a nutshell.

Wapperdude
Visio 2019 Pro