Skip to content

Instantly share code, notes, and snippets.

@rpc180
Created October 29, 2020 18:02
Show Gist options
  • Save rpc180/bcc1f14a14698b6ca5a414e783347440 to your computer and use it in GitHub Desktop.
Save rpc180/bcc1f14a14698b6ca5a414e783347440 to your computer and use it in GitHub Desktop.
VB Script to Resize All MS Word Images
#
# 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