Step 4 - Share your macro with others

The important thing to understand about sharing macros is that it’s stored in the Office file, so you will need to share that file with others. If you created a macro in Word, you’ll need to share the file as a Word Macro-Enabled Template (.dotm) or Word Macro-Enabled Document (.docm). If you created the macro in Excel, you’ll need to share the file as an Excel Macro-Enabled Workbook (.xlsm) or Excel Macro-Enabled Template (.xltm).

If you created a Word macro, there are a few extra steps that you’ll need to do to share your macro:

Create the blank Word template

  1. Open a new Word document.

  2. On the File menu, click Save As.

  3. Name your file global_macros.dotm.

  4. From the Format drop down, select Word Macro-Enabled Template (*.dotm) as the Format.

  5. Choose where you want to store the file on your network.

  6. Click Save and then close the template.

Export the Word macro from your document

With the macro that you recorded in Step 1, follow these next steps to export the macro:

  1. Open the document or template containing the macro that you want to export.

  2. On the Tools menu, point to Macro, and then click Macros.

  3. Select the macro that you want to export, and then click Edit. Select Macro to Export

  4. In the Visual Basic Editor, click File > Export File.

  5. Save the macro in the same folder as the macro-enabled template, global_macros.dotm.

Import the Word macro into your new blank template

  1. Open global_macros.dotm and thenclick Tools > Macro > Visual Basic Editor.

  2. To import the macro, click File > Import File,go to the folder where you exported your macro, select the file, and then click Open.

  3. Save the module, quit the Visual Basic Editor, and then quit Word.

Now you can share your macro with others, and tell them to follow the steps below to install the macro on their computer.

Install template: set up Word to use your macro

  1. Place the global_macro.dotm file in this location:

    • Word for Mac 2011: Macintosh HD: Users: Username: Library: Application Support: Microsoft: Office: User Templates: My Templates

    • Word 2003 on Windows or later: C:\Documents and Settings\Username\Application Data\Microsoft\Word\STARTUP

      Note:  Username is the logon name of the user.

  2. In Word, click Word > Preferences….

Word Preferences

  1. In the Personal Settings section click File Locations

  2. Select Startup from the File locations list, then click Modify….

Fiile Location

  1. Verify Word is using the same folder where you placed the global_macro.dotm file as the Startup folder.

  2. Click Choose to close the Choose a folder dialog, then OK to close the File Locations dialog.

Your last step is to tell Word to use the global_macros.dotm file when it starts up.

  1. In Word, click Tools > Templates and Add-Ins….

  2. Check the global_macros.dotm file from the list and click OK.

    Tip:  If you don’t see your template in the list, then your global_macros.dotm file is not in the Word startup folder. Go back to step 1 in this section and verify that the Startup folder is the same folder as the one where you copied the global_macros.dotm file.

Setup Global Template in Word

 Step 1 - Start with the Macro Recorder

Step 2 - Read and Understand the Code

Step 3 - Learn Programming Fundamentals

Step 4 - Share Your Macro with Others

Step 5 - Real World Examples

Expand your Office skills
Explore training
Get new features first
Join Office Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.