Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, and 2016. 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: Editing Word's Built-in Commands.

Editing Word's Built-in Commands

Written by Allen Wyatt (last updated November 17, 2021)
This tip applies to Word 2007, 2010, 2013, and 2016


1

Word allows you not only to edit macros, but also to edit built-in commands. You can replace or augment these commands with your own macros. You can perform the editing by following these steps:

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

  4. Using the command list, locate and select the command you want to edit. Once selected, the name should appear not only in the list of commands, but also in the Macro Name box at the top of the dialog box.
  5. Using the Macros In drop-down list, select where you want your edited command to appear. For instance, you could select All Active Templates and Documents, or you could select a specific template or document name where your new command should be stored. The command name should still appear in the Macro Name box at the top of the dialog box.
  6. Click on Create. (The Create button will not be clickable until you perform step 4.) Word starts the VBA Editor and shows the program instructions that make up the built-in command. (Some commands may have many instructions and others may have none.)
  7. Make your changes to the command.
  8. Close the Editor window by clicking on the Close icon in the upper-right corner of the window.
  9. Save your changes, if prompted.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the WordTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

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

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

Telling which Worksheets are Selected

If your macro processes information on a number of worksheets, chances are good that you need your macro to figure out ...

Discover More

Updating to Smart Quotes

As you type a document, Word automatically converts your quote marks and apostrophes to "curly" versions that look more ...

Discover More

Removing a Watermark

Word allows you to add watermarks to your documents. If you inherit a document that includes a watermark, you may be at a ...

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)

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 ...

Discover More

Moving Through a Table in a Macro

Do you need to step through a table, cell by cell, in a macro? It's easy to do using the Move method, as described in ...

Discover More

Protecting Macros in the Normal Template

You can spend quite a bit of time developing macros that enhance your use of Word. Protecting those macros when they are ...

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 1 + 1?

2022-03-03 07:46:35

James Martin

I have followed your instructions to get this standard vba. I will work with this to see if I can put an "if block", if there is or isn't image files (inlineshapes) in the Word Doc. And then select the first image file in a loop, and Open the FormatPicture Menu and then perhaps use SendKeys to reduce the image resolution. I use this a lot and have failed to do a macro to automate this with just SendKeys.

[I have thought about having a helper word file to copy and paste image files to it and then back to the original file to try to get around the inability to compress images automatically with a macro, but not tried yet]

Sub FormatPicture()
'
' FormatPicture Macro
' Changes the picture scaling, size, and cropping information
'
Dialogs(wdDialogFormatPicture).Show

End Sub


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.