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.
Written by Allen Wyatt (last updated November 17, 2021)
This tip applies to Word 2007, 2010, 2013, and 2016
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:
Figure 1. The Macros dialog box.
Note:
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.
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!
Sometimes it is helpful to know how often a particular phrase appears within a document. If you need to know such a ...
Discover MoreDo 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 MoreYou can spend quite a bit of time developing macros that enhance your use of Word. Protecting those macros when they are ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
2022-03-03 07:46:35
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
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.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments