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: Renaming a Macro.

Renaming a Macro

by Allen Wyatt
(last updated January 9, 2017)

4

A macro is nothing more than a series of instructions you want the computer to execute. It is a program which is run in the context of the application you are using. As you create macros, you will probably come across a need to rename a few of the existing macros. To do this it's easiest to work with the VBA Editor. Follow these steps:

  1. Press Alt+F8. Word displays the Macros dialog box.
  2. In the list of available macros, choose the one you want to rename. The Edit button should become active.
  3. Click Edit. The VBA Editor is started, and you see the macro you chose to edit.
  4. At the top of the macro you'll see the procedure definition, consisting of the word "Sub" followed by the name of the macro. Change the actual name in this line. (Don't change the word Sub or the space that follows the word Sub, and don't change anything starting with the left parenthesis that follows the name of the macro.)
  5. Close the VBA Editor.

That's it; the macro is now renamed to whatever name you used in step 4.

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

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

Making Word Stop at the End of a Document when Reviewing Changes

The Track Changes tool is a great help when you want to see what edits have been made to a document. When you review those ...

Discover More

Understanding Monospace Fonts

Monospace fonts allow you to easily achieve a specific "look" with your text or to line up information in a certain way. This ...

Discover More

Generating a Power Efficiency Diagnostics Report

Your computer uses power to operate, and Windows has a great impact on how much power it uses. You can use a hidden Windows ...

Discover More

Do More in Less Time! Are you ready to harness the full power of Word 2013 to create professional documents? In this comprehensive guide you'll learn the skills and techniques for efficiently building the documents you need for your professional and your personal life. Check out Word 2013 In Depth today!

More WordTips (ribbon)

Counting the Instances of a Text String

Sometimes it is helpful to know how often a particular phrase appears within a document. If you need to know such a count, ...

Discover More

Highlighting Every Thousandth Character

Not satisfied with the detail provided by the Word Count feature in Word? Perhaps you want to actually know where every one ...

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}] 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 4 - 2?

2017-01-09 16:14:44

allen@sharonparq.com

Phil: No, unfortunately it doesn't. You'll need to handle that part manually.

-Allen


2017-01-09 15:01:10

Phil Maier

Thanks for this tip Allen. When renaming a macro this way does the VBA editor also change all references to the macro where it is invoked in the code modules for the application?


2017-01-09 11:39:42

mandora

If there are calls to the original macro, change those names as well.


2014-04-08 17:13:00

ravi

Sub: MS Word (office 2010), TIP NOT WORKING

1. This tip does not work "in MY" ms_word 2010.
2. After renaming, macro does not work.
3. EVEN AFTER RE-RENAMING TO ORIGINAL NAME, macro does not respond/work!

Please Guide,
-Regards


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.