Can't Edit Macros

Written by Allen Wyatt (last updated March 27, 2021)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365


3

Patricia recently upgraded from Word 2007, and some of her macros need editing. However, the Edit button in the Macros dialog box is grayed out. She wonders what she can do to edit her macros.

There are a few things to check, Patricia. The first thing you'll want to do is to figure out where your macros are stored. If the macros are stored in a document, make sure that you save the document (use Save As) as a DOCM file. If you save it as a DOCX file, the macros will be stripped from it. If it is in a DOCM file, then you will be able to edit your macros.

If the macros are not stored in a document but are, instead, in a template, then you'll want to load your template directly and save it back out (again, using Save As) as a macro-enabled template. Only then will you be able to modify the macros in the template.

The other thing you'll want to check is the security settings on your system. This is done by going to the Trust Center. Follow these steps:

  1. Display the Developer tab of the ribbon.
  2. Click the Macro Security tool, in the Code group. Word displays the Trust Center dialog box.
  3. Make sure Macro Settings is selected at the left of the dialog box. (This option should be selected by default.) (See Figure 1.)
  4. Figure 1. The Trust Center dialog box.

  5. Click the Enable All Macros radio button.
  6. Click OK.

Now when you open the problem document, you should be able to edit the macros.

A word of caution: These steps basically let any macros run on a system. If you are confident in your ability to not open any documents containing malicious code, then you are fine. If you routinely open documents from others who may be oblivious to such code, then you'll probably want to rerun the same steps and, in step 4, choose a more restrictive option such as Disable All Macros with Notification. While macros (and macro editing) will be disabled, you can still choose to run a macro by clicking a rather obvious button that will appear above the document—once it is loaded—and just below the ribbon.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (8381) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 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

Creating Labels

Using Word to create and print labels is a snap. All you need to do is provide the text you want on the labels, pick a ...

Discover More

Determining If the End of a Text File Has Been Reached

When writing a macro that processes a text file, you may need to know when the end of the file has been reached. This is ...

Discover More

Showing a Dynamic Number Range in a Header

If you are creating a reference document of some type, you may want to include in the header of that document an ...

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)

Converting Paragraphs to Comments

Want to pull text from a bunch of paragraphs and stuff that text into comments? It's easy to do using the macro presented ...

Discover More

Moving the Insertion Point to the End of a Line

When writing a macro to process the text in a document, you may need to move the insertion point to the end of a line. ...

Discover More

Determining the Week of the Year

If you are working with dates in a macro, you may need to determine which week of the year a date falls within. This can ...

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 2 + 8?

2022-10-07 07:07:32

T.G. Johnson

After many weeks of frustration, phone calls, and googling, I found an easy way to fix this.

Make your macros in a Word DOC document.

They will then automatically work on any DOCX document.

I am not a techie, just a really annoyed author who needs my shortcuts.


2022-09-21 04:15:04

Ken

Documents containing macros that come from the Internet or a risky source may be blocked. To unblock them save the document then right click on the file name and select Properties. There will be an option to unblock.


2022-09-20 14:53:55

Mario J Salazar

I have tried this and many other things and Word will not allow me to use my Macros since this month. Apparently Microsoft instituted a change that macros from the internet would be disabled by default, but it seems it has given me no tools in allowing the macros I have been using for years.. They remain disabled even though I put their location as OK in the trust center and they are not on a network. Even without doing this, your solution should work, but sadly it does not.This is really frustrating.


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.