Protecting Macros in the Normal Template

by Allen Wyatt
(last updated June 29, 2019)

On Brett's company's network, the Normal template is periodically updated, automatically, based on whatever it is that his IT department does. The problem is, the Normal template contains Brett's macros that he's developed, which means they are overwritten. He wonders if there is a way to make sure that his macros remain intact even if the IT department decides to update the Normal template.

There are a few things to work out here, before suggesting how this situation might be approached. First, Brett needs to determine where his Normal template is stored. If it is stored on a network drive so that it is being accessed by multiple people on the network, then Brett should probably not be modifying it anyway—it is under the purview of the IT department and Brett shouldn't be storing his own macros in it.

If, however, the Normal template is on Brett's local machine, that is a different story. This means that the IT department is, in some manner, updating the Normal template not only on Brett's machine, but also on all the other machines on the network. From a user's perspective, this is just a little rude. (OK, quite a bit rude, and a bit draconian to boot.) The company should be developing their own set of custom templates and then storing those in a particular location that doesn't involve overwriting any user's Normal template. That approach involves setting the Workgroup Templates location, as described in this tip.

Regardless of what the company should do, they will, of course, continue to do what they want to do—including the overwriting of Brett's Normal template. Brett can take some steps to protect his macros, including periodically exporting the macro modules from the Normal template to a backup location. You can do that by following these general steps:

  1. Press Alt+F11 to display the Visual Basic Editor (VBE).
  2. In the Project Explorer area at the left of the VBE, locate the Normal project.
  3. Expand the Modules folder under the Normal project. (Modules are the organizational element that contain your macros.)
  4. Right-click on the module you want to export. The VBE displays a Context menu.
  5. Choose Export File from the Context menu. The Export File dialog box is displayed.
  6. Use the controls in the dialog box to specify a name for your backup and the location where it should be stored. (You can store it on the desktop for the time being and, later, outside of Word, move it to a more secure location.)
  7. Click the Save button.
  8. Close the Visual Basic Editor.

This is a particularly good approach if your macros don't change all that often—whenever the Normal template is updated, you can simply use the backups to import the macro modules back into it. (You import the macros by following the steps just outlined but choosing Import File from the Context menu displayed in step 4.)

Of course, over time this may turn into a game of whack-a-mole. You have to remember to keep your macro backups up to date, and you'll need to take steps to update your Normal template whenever the IT department does their work. A better solution is to simply create your own "global" template that contains your macros. You can store this template in your startup folder, and then it will be available whenever you start Word. Just move the macros to a brand-new, empty template. (A good way to do this is to export them from the Normal template using the steps already discussed. Delete the modules from the Normal template after exporting, and then use the Visual Basic Editor to import those modules into the new, empty template.)

Next, you'll want to store this new template in the Startup folder. The location of this folder can vary from system to system. To me, the easiest way to discover the Startup folder location is to follow these steps:

  1. Display the Word Options dialog box. (In Word 2007 click the Office button and then click Word Options. In Word 2010 or a later version display the File tab of the ribbon and then click Options.)
  2. Click Advanced at the left of the dialog box.
  3. Scroll to the bottom of the options and click File Locations. Word displays the File Locations dialog box. (See Figure 1.)
  4. Figure 1. The File Locations dialog box.

  5. In the list of File Types, choose Startup.
  6. Click on Modify.

The resulting dialog box indicates the location of the Startup folder being used by Word. Once you have the location of the Startup folder, close Word and use Windows to copy the template into this folder. The next time you start Word, the template is opened automatically and all the macros it contains are available, the same as if they were still in your Normal template. Plus, they won't be disturbed by anything your IT department may do to your Normal template.

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 (13648) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Office 365.

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

Ensuring Standardized Numbering

Want to make sure your paragraph numbering looks the same on different computer systems? It's a harder task in Word than ...

Discover More

Different Ways of Inserting Dates

Word provides a couple of different ways you can insert the current date into a document. Which method should you choose? ...

Discover More

Creating Two Versions of the Same Document

You may often need to create two versions of the same document, one with everything and the other with a subset of what ...

Discover More

Learning Made Easy! Quickly teach yourself how to format, publish, and share your content using Word 2013. With Step by Step, you set the pace, building and practicing the skills you need, just when you need them! Check out Microsoft Word 2013 Step by Step today!

More WordTips (ribbon)

Passing a Data File Name via Command Line to a Macro

Using the command line to pass paramaters to a program is a common occurrence. Using the command line to pass parameters ...

Discover More

Controlling the Hidden Text Attribute

Want your macro to change the Hidden attribute for some text in your document? It's easier to change than you might think.

Discover More

Determining the Current Directory

When creating macros, it is often necessary to know which directory is the default. Here's how you can find out by using ...

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}] 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 five minus 0?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


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.

Newest Tips
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.