Word

From Leo's Notes
Revision as of 18:10, 10 August 2022 by Leo (talk | contribs) (Created page with "== Tasks == === Resize all images === There is no easy way to resize all images in a document because you cannot select multiple images in Microsoft Word. To manually resize all images, you would have to double click on each and every image and changing the height/width manually. Alternatively, you can use the following vbscript macro. # Select the portion of the document containing your images, or hit <code>Ctrl + a</code> to select the entire document # Hit <code>A...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This page was last edited on 10 August 2022, at 18:10.

Tasks

Resize all images

There is no easy way to resize all images in a document because you cannot select multiple images in Microsoft Word. To manually resize all images, you would have to double click on each and every image and changing the height/width manually.

Alternatively, you can use the following vbscript macro.

  1. Select the portion of the document containing your images, or hit Ctrl + a to select the entire document
  2. Hit Alt + F11. In the VB window, insert a new module: Insert -> Module. Paste the following macro:
Sub ResizeImages()
    Dim shape As InlineShape
    For Each shape In Selection.InlineShapes
        shape.LockAspectRatio = msoTrue
        shape.Width = CentimetersToPoints(15)
    Next
End Sub
  1. Hit F5 or click on the 'Run' button. The images should be resized.