Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, and 2013. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Printing a Macro List.

Printing a Macro List

by Allen Wyatt
(last updated March 29, 2014)

1

Many Word users rely upon macros to perform all sorts of tasks in the program. Over the years it is possible to accumulate quite a few different macros. At some point you may want a way to print out a list of your macros for reference purposes. Unfortunately, Word doesn't provide a way you easily print out such a macro list.

If you just need a quick list, one way to do it is to use Word's built-in tools to list all the commands available to Word. Since Word considers macros to be "commands," the command list will also include your macros. But since you don't want all of the other commands in Word (besides your macros), you will need to do a little editing. Follow these steps:

  1. Press Alt+F8. Word displays the Macros dialog box.
  2. Using the Macros In drop-down list, choose Word Commands. (See Figure 1.)
  3. Figure 1. The Macros dialog box.

  4. In the list of Word commands, select the ListCommands option.
  5. Click on Run. Word begins to run the macro and displays a dialog box.
  6. Click the All Word Commands radio button.
  7. Click OK.

Word then creates a new document that contains a table with all Word commands. Remember that your macros are buried within the table. To find them, search for "normal." (make sure you include the period, but not the quote marks). This finds any "commands" contained in the Normal document template. You can copy the names of these commands—they are your macros—to a different document. If you have macros in any other templates, search for those template names, as well.

Another approach is to follow these general steps:

  1. If your macros are not in the Normal template, open the template that contains your macros.
  2. Press Alt+F11. Word displays the Visual Basic editor.
  3. Double click a module on the left side, so that the code appears on the right.
  4. Select all the code and press Ctrl+C. This copies the macro code to the Clipboard.
  5. Open a new Word document and paste all the macro code into the document.
  6. Press Ctrl+End to move to the end of the document.
  7. Press Ctrl+H. Word displays the Replace tab of the Find and Replace dialog box.
  8. Click the More button if it is available. (See Figure 2.)
  9. Figure 2. The Replace tab of the Find and Replace dialog box.

  10. Make sure the Use Wildcards check box is selected.
  11. Using the Search drop-down list, choose Up.
  12. In the Find What box, type the following: (Sub*\(\))(*)
  13. In the Replace box, type the following: \1^p
  14. Click Replace All.

What you instructed Word to do was to delete everything except the subroutine names (these are your macro names). What is not included in this process are any functions you may have created in your macros. Those functions are not publicly available macros, so for most people this isn't a big issue.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (13041) applies to Microsoft Word 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Word here: Printing a Macro List.

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

Removing Return Addresses

Word allows you to print return addresses on your envelopes. You may run across a scenario where the return address is being ...

Discover More

Searching for Text that Does Not Have a Certain Format

You can easily use Find and Replace to find text that has a particular format to it. Most people don't know you can use the ...

Discover More

Quickly Updating Values

You can easily adjust the values in a range of cells by a certain amount. The key is to modify how you use the pasting ...

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)

Checking for a Text Selection Length

Need to know if the user selected some text before running your macro? Here's how to make that check.

Discover More

Automatically Inserting Tomorrow's Date

Do you routinely need to work with tomorrow's date? Why not create a template that automatically adds tomorrow's date to any ...

Discover More

Getting User Input in a Dialog Box

Want to grab some interactive input from a user in your macro? The best way to do that is with the InputBox function, ...

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 8Mpixels. 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 three more than 5?

2017-03-14 11:57:06

Pam

In Word 2007, is there a way to view a list of the macros I created along with the keyboard shortcuts I assigned to them? (So not just the names of macros, but also the keyboard shortcut use to activate it). I know how to do it for the macros that "came" with Word, but mine aren't in that list. I could just go through all the combinations of keys to see what they do, but viewing a list would be much easier, obviously, and I would think there would be a way to do this. They're apparently stored in "All Documents (Normal.dotm)." Thanks!


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.