Written by Allen Wyatt (last updated October 12, 2024)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021
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:
Figure 1. The Trusted Locations area of the Trust Center.
With the full path name in hand (step 6) 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 6) 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 they cannot be directly edited. If you need to make changes to them (or add other macros to the template), you'll want to get out of Word and, within Windows, move the template out of the Startup folder. You can then load the template directly and make changes you desire. Then, save the template and again get out of Word. Finally, use Windows to 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:
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, 2016, 2019, Word in Microsoft 365, and 2021.
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!
Want to print your macros to hard copy? There are a few approaches you can use to accomplish the task, as discussed in ...
Discover MoreMacros can make life easier, as they provide a fast and efficient way of processing text in a document. Such is the case ...
Discover MoreOne of the powerful programming structures provided in VBA allows you to conditionally execute commands. The If ... End ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
2024-10-14 06:23:17
Sarah Patey
(see Figure 1 below)
I have a macro (one of Paul Beverley's) that enables me to call up the dialog to assign a keyboard shortcut. I went through this process and got the message above.
Would I need to assign my shortcuts in the DOTM file when I create it, and before moving it to the startup folder?
Figure 1.
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.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments