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!
Got some numbers you need spelled out? Here's a handy macro that can convert numbers like "123" to words like "one ...
Discover MoreWhen working with macros, you may want to create a variable that will remain constant from one instance of the macro to ...
Discover MoreThere are a myriad of ways in which a date can be formattedâ€"day first, month first, number of digits in the year, etc. ...
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 © 2023 Sharon Parq Associates, Inc.
Comments