In this article, we will show you how to quickly resize multiple pictures in your Word document to meet certain requirements.
It’s not unusual to have many pictures inserted into a Word document nowadays. Yet, sometimes these pictures should be set in the same size. And normally, the picture inserted is in “In line with text” wrapping style, which means we can’t select them all at the same time. Thus, to adjust the picture size can be time-consuming even when there are only several of them.
Following are 2 quick ways you might find helpful.
Method 1: Use “F4”
- First and foremost, double click on a picture to enter editing mode.
- Second, click the down arrow button in “Size” group under “Format” tab to open the “layout” dialog box.
- In the dialog box open, change the height and width as you need first.
- Then clear the “Lock aspect ratio” and “Relative to original picture size” boxes in “Scale” part.
- Lastly, click “OK”.
- Next, click on another picture and press “F4”. You shall find the second picture now is in the same size as the previous one. “F4” here can repeat the last action.
Method 2: Use VBA Codes
Generally speaking, method 1 can save you a lot time already. However, in case you find it dull and boring to click on picture and press “F4” key, you can take the help of VBA codes to finish the task once for all.
- To start with, click “Developer” tab.
- Then click “Visual Basic” in “Code” group or press “Alt+ F11” to open the VBA editor.
- Next, click “Normal”.
- Click “Insert”.
- And choose “Module”.
- Then double click on the new module to open editing area.
- Paste the bellowing codes there:
Sub SetupAllPictureSize() Dim objInlineShape As InlineShape Dim objShape As Shape For Each objInlineShape In ActiveDocument.InlineShapes objInlineShape.Height = 500 objInlineShape.Width = 500 Next objInlineShape For Each objShape In ActiveDocument.Shapes objShape.Height = 500 objShape.Width = 500 Next objShape End Sub
- Finally, hit “Run” button.
- You can alter the values in codes “objInlineShape.Height = 500” and “objInlineShape.Width = 500” as you need to change the height and width of pictures in “In line with text” wrapping style.
- You can alter the values in codes “objShape.Height = 500” and “objShape.Width = 500” to change the height and width of pictures not in “In line with text” wrapping style.
Handle Document Problems
A Word document containing too many pictures can not only slow down the processing speed but also cause document corruptions. One way is to avoid inserting too many pictures in a Word file so you won’t encounter with such a problem. The other way is however, to get a docx problem fix tool in advance, so you won’t have to worry about losing important file.
Vera Chen is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including xlsx data error repair tool and pdf repair software products. For more information visit www.datanumen.com
My issue was when I pasted in larger items it went off the page. So I hobbled together this code.
Dim i As Long
For i = 1 To .InlineShapes.Count
If .Width > 520 Then
.Width = 519
If it’s more than 520 wide it reduces the width to 519. Which is about the width of a normal word document. You can adjust the 520 as you need.
Thank you for the VBA code. If someone wants to use scale width or height, then the following parameters can be used in the code (80%):
For Each iShp In .InlineShapes
If .Type = wdInlineShapePicture Or wdInlineShapeLinkedPicture Then
.ScaleWidth = 80
.ScaleHeight = 80
Great trick with VBA… just mentions that dimensions are in “points”… use google to convert to inches or millimeters
The F4 command doesn’t appear to work on a Mac (or Cmd Y). F4 seems to be a global command in that it repeats the last action you did regardless of the program you are in; e.g., if you pasted a search term in your browser a while back it will paste that text into Word (but not your immediately preceding resize command). Haven’t found a way around this.