Created
October 29, 2020 18:02
-
-
Save rpc180/bcc1f14a14698b6ca5a414e783347440 to your computer and use it in GitHub Desktop.
VB Script to Resize All MS Word Images
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Developer tab enabled in Word using File | Options | Customize Ribbon | CHECK Developer option in right column. | |
# | |
# Select Visual Basic under Developer tab and Double click on the created Module 1 to edit it | |
# Paste the following code into the module and then click the Play button at the top to run it on the current document | |
# | |
Sub SetupAllPictureSize() | |
Dim objInlineShape As InlineShape | |
Dim objShape As Shape | |
Dim PercentSize As Integer | |
PercentSize = 60 | |
For Each objInlineShape In ActiveDocument.InlineShapes | |
objInlineShape.ScaleHeight = PercentSize | |
objInlineShape.ScaleWidth = PercentSize | |
Next objInlineShape | |
For Each objShape In ActiveDocument.Shapes | |
objShape.ScaleHeight PercentSize, True | |
objShape.ScaleWidth PercentSize, True | |
Next objShape | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment