How to Resize Selected Multiple Images in Ms word

This tutorial will show you how to resize only the selected images in your document.

Let’s start!

  1.  First open your document in which you have pictures that needs to be batch resized.
  2. Make a selection over several images. You have to select the images like you select the letters and words. Because the images are in form of Inline shapes.
  3. Now press “Alt+ F11” to open VBA editor in Word or you can go to developer menu and Click Visual Basic.
  4.  Next click on “Normal” and click “Insert” tab in the main menu.
  5. Then choose and select “Module”.
  6. Open the new module by double clicking on it.
  7. Then on the editing space on the right, paste the following codes:
  8. Sub ResizeImagesInSelection()

    'Support-"ThinkeasyTV"-by-subscribing-our-YT-channel

    Dim objInlineShape As InlineShape

    Dim objShape As Shape

    Dim strDegree As String

    Application.ScreenUpdating = False

    strheight = InputBox("Enter Height in Inches: ")

    strwidth = InputBox("Enter Width in Inches: ")

    Set objDoc = ActiveDocument

     For Each objInlineShape In Selection.InlineShapes

     Set objShape = objInlineShape.ConvertToShape

    objShape.LockAspectRatio = False

    objShape.Height = InchesToPoints(strheight)

    objShape.Width = InchesToPoints(strwidth)

    Set objInlineShape = objShape.ConvertToInlineShape

    Next objInlineShape

     Application.ScreenUpdating = True

    End Sub

  9. Next click on “Run”. 
  10. There will be an input dialog box where you can enter a height and width of images in Inches and click “OK” to proceed.

  • (If you want the units in centimeters, change the part of code from Inches to Centimeters)
  • Then you will only have images in selection resized to your input height width ratio.

RESULT:



Post a Comment

0 Comments