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

Putting Document Names in Headers or Footers

Want to include the file name of a document on the printed copy without rearranging the layout? You can use a header or ...

Discover More

Extracting a Pattern from within Text

If you have a large amount of data in a worksheet and you want to extract information from the text that meets certain ...

Discover More

Printing Index Field Codes

Word allows you to configure what you see so that field codes are visible instead of the results of those field codes. ...

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)

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

Calculating a Future Date

Need to figure out a date a certain number of days, weeks, months, or years in the future? It's easy to do using the ...

Discover More

Automating a Manual Process with a Macro

The entire purpose of macros is to allow you to automate repetitive or tedious tasks with relative ease. How easy 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}] (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 two more than 7?

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.