Making Macros Available without Using the Normal Template

Written by Allen Wyatt (last updated May 13, 2024)
This tip applies to Word 2007, 2010, 2013, and 2016


5

Michael has a set of macros that copy selected content from one open document to another open document. He's put these macros in a template in an attempt at portability, but they don't seem to be available within documents based on the template. Michael wonders if there is a way—short of putting them in the Normal template—to make these macros available to other open documents.

The traditional way to do this is to create your own template, which means that you save it using the DOTM extension. (Simply save the file as a macro-enabled template. This sets the extension properly.) Make sure that the template includes all of the macros that you want to universally access. (It should not contain macros that you want to keep in your Normal template, instead.)

When your template is set up and saved just the way you want it, follow these steps:

  1. Display the Word Options dialog box.
  2. At the left side of the dialog box, click Trust Center.
  3. Click the Trust Center Settings button. Word displays the Trust Center.
  4. At the left side of the Trust Center, click Trusted Locations. (See Figure 1.)
  5. Figure 1. The Trusted Locations area of the Trust Center.

  6. In the list of locations, locate and click once on the location that contains the word "Startup."
  7. Click the Modify button. Word displays the Microsoft Office Trusted Location dialog box. (See Figure 2.)
  8. Figure 2. The Microsoft Office Trusted Location dialog box.

  9. Note the full path for the location. (Jot it down or copy it to somewhere like a temporary text document so you can refer to it later.)
  10. Click the Cancel button to close the Microsoft Office Trusted Location dialog box.
  11. Click the Cancel button to close the Trust Center.
  12. Click the Cancel button to close the Word Options dialog box.

With the full path name in hand (step 7) you can get out of Word. You want, at this point, to locate the template you created earlier and copy it to the folder specified by the path name. It is in this folder (the Startup folder) that you place documents you want automatically loaded whenever you start Word. By placing the template there, you are assured that it will be opened when you start Word, and that the macros it contains will be available during your Word session.

You should note that the folder you discovered through the above steps (the one shown in step 7) is probably a hidden folder on your system. This may make it a bit tricky to track down, but you can search on my WindowsTips site (windows.tips.net) to find out how to display and use hidden folders.

There is one potential "gotcha" here: When you place the template in the Startup folder, the macros in the template can be run, but the cannot be directly edited. If you need to make changes to them (or add other macros to the template), you'll want to move the template out of the Startup folder, load it directly, make and save your changes, then move the template back to the Startup folder.

Note that once your template is fairly stable (the template you stored in the Startup folder), you can share that template with others and invite them to store it in their own Startup folder. You'll need to give them directions, of course, on how to do that storing, as noted above.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the WordTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (4632) applies to Microsoft Word 2007, 2010, 2013, and 2016.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Setting Matrix Row Spacing in the Equation Editor

The Equation Editor is a tool you can use to create complex mathematical formulas and insert them in your documents. If ...

Discover More

Stopping a Conditional Formatting Rule from Breaking into Smaller Ranges

When you paste information into a row that is conditionally formatted, you may end up messing up the rules applied to ...

Discover More

Adding Pop-Up Documentation to a Cell

Want to have a small help screen pop up when a user selects a particular cell? This can be done by using data validation, ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More WordTips (ribbon)

Resetting Character Formatting in a Macro

Shortcut keys are a great way to apply styles to text in a document. You can easily create a shortcut key assignment for ...

Discover More

Converting Inches to Points

Typographical measurements are often expressed in points. There are several formatting settings that, when accessed ...

Discover More

Repaginating in a Macro

When creating a macro that extensively processes a document, you may need to periodically force Word to repaginate the ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 6 - 0?

2024-05-13 13:49:00

Ann Olmsted

Thank you so much! I wish I'd come across this tip years ago. I had no Startup folder in the listed location, so I created one, copied the template with my most-used macros there, and now they're ready to run as soon as I create and open new documents.


2024-05-13 05:57:53

jamies

Note the subfolders tickbox.
But you should ensure that the Startup folder is a secured one - as in ownership, and access ,
Or that may be another way in for sophisticated malware.

Then there is the Windows "Hardlinks" facility -
where you can give a folder, or file a second name.
And the NTFS file system will create a new entry for the linked to file or folder.
Note - the file or folder does not get moved, or altered.
but the hardlink means that file explorer and other access facilities get to access it using the hardlink entry.
And Windows will not delete the file until all the hardlinks have also been deleted

so - having created the hardlink, in the \Startup\ folder - it is considered to be part of that folder -
but can be edited using it's original name, and copied using either name -
just consider the copy will be done using the name you selected to copy, and that generated copy is not the file/folder with the additional names.


2020-05-24 12:49:41

Sylvain

Thank you so much Allen,
Your tip & tricks saved my day many times
God bless you


2017-11-04 21:24:58

Ken Endacott

There is a step left out in the description of how to make changes to a template file. After copying from the Startup folder to another folder and modifying with Word, before you can copy back to the Startup folder, Word must be closed otherwise you will get a message that the file is in-use. A better scheme to keep in another folder a “master copy” of the template that can be modified and tested. Then close Word and use Windows Explorer to copy into the Startup folder.

All the macros don’t have to be in the one template file, there can be several template files in the Startup folder. This gives flexibility in managing and editing the macros, for example all macros involving styles can be in one template and all macros involving copying between documents in another template.


2017-11-04 05:04:41

Italophile

The procedure outlined in this article will certainly work for Excel which relies only on the Trusted Locations but Word has a second place where the Startup path must be specified. This is found under File | Options | Advanced | File Locations.
(see Figure 1 below)
Find the entry for the Startup folder, select it and click the Modify button.
(see Figure 2 below)
This will open the currently assigned startup folder in a file browser window.
Ensure that the location for the Startup folder is the same as the one specified under Trusted Locations. If you just have a default installation of Word this should be the case.


Figure 1. Advanced Options dialoog


Figure 2. File Locations dialog




This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.