Record macros in Visio

Create a macro to automate steps or processes you do repeatedly. The commands for recording a macro are on the Developer tab. If you want to design a macro using Visual Basic, see About macros.

Note:  Macros can trigger security alerts, because they can be created and used for malicious purposes. For more about the risks of macros and what to do with a security alert, see Enable or disable macros in Office files.

  1. On the Developer tab, click Record Macro. (If you don’t see the Developer tab, see “Show the Developer tab” below.)

    Macros commands

  2. In the Macro name box, type a name for the macro.

  3. In the Shortcut key box, type a shortcut key that can be used with the CTRL key to run the macro.

  4. In the Store macro in box, click the document in which you want to store the macro.

  5. In the Description box, type a description for the macro.

  6. Click OK to begin recording the macro.

  7. Perform the actions you want to include in your macro. On the Developer tab, use Pause Recording if needed.

    When you record a macro, you can use the mouse to click commands and options, and to work with shapes and objects in drawings.

  8. To stop recording your macro, click Stop Recording on the Developer tab.

You can also pause or resume macro recording using the Recording toolbar.

To view the resulting code, on the Tools menu, point to Macros, click Macros, click the macro name, and then click Edit.

Show the Developer tab

  1. Click the File tab and then click Options.

  2. Click Customize Ribbon.

  3. Under Customize the Ribbon and under Main Tabs, select the Developer check box.

    The Developer tab appears at the end of the ribbon opposite the File tab.

Share Facebook Facebook Twitter Twitter Email Email

Was this information helpful?

Great! Any other feedback?

How can we improve it?

Thank you for your feedback!