Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or
0
0
0
s2smodern

 How to insert multiple pictures with same size in Word document?

Normally, you can insert multiple images at once in a Word document with their original size. Sometimes, you need to arrange these images to the same size when inserting. This article, I will talk about how to insert multiple pictures with the same size in a Word document.

Insert multiple pictures with same size in Word document with VBA code

Resize all pictures to the same size based on a specific image with Kutools for Word


Resize all pictures to same size based on selected one:

To resize all images into the same size, you should resize them one by one normally, but, with Kutools for Word's Resize Images feature, you can adjust all pictures with the same size by a selected on. On another hand, you can also resize them to a specific percentage as you need.

doc adjust images 05

Kutools for Word: with more than 100 handy Word add-ins, free to try with no limitation in 60 days. Click to Download and free trial Now!


Insert multiple pictures with same size in Word document with VBA code

The following vba code can help you to insert multiple pictures and resize them to your specified size at once, please do as this:

1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module Window.

VBA code: insert multiple pictures with same size:

Sub InsertSpecificNumberOfPictureForEachPage()
    Dim xDlg As FileDialog
    Dim xFilePath As String
    Dim xFileName As String
    Dim xMsbBoxRtn As Long
    Dim xPicSize As String
    Dim xShape As InlineShape
    Set xDlg = Application.FileDialog(msoFileDialogFolderPicker)
    If xDlg.Show = -1 Then
        xFilePath = xDlg.SelectedItems(1) & "\"
    Else
        Exit Sub
    End If
    xFileName = Dir(xFilePath & "*.*", vbNormal)
    While xFileName <> ""
        If Not (Right(xFileName, 4) = ".png" Or Right(xFileName, 4) = ".bmp" _
        Or Right(xFileName, 4) = ".jpg" Or Right(xFileName, 4) = ".ico") Then
            GoTo LblCtn
        End If
        With Selection
            .InlineShapes.AddPicture xFilePath & xFileName, False, True
            .TypeParagraph
            .Collapse wdCollapsEnd
            .TypeText Left(xFileName, InStrRev(xFileName, ".") - 1)
            .ParagraphFormat.Alignment = wdAlignParagraphCenter
            .TypeParagraph
        End With
LblCtn:
        xFileName = Dir()
    Wend
    ActiveDocument.InlineShapes(1).Select
    Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
    xMsbBoxRtn = MsgBox("Do you want to resize all pictures?", vbYesNo, "Kutools for Word")
    If xMsbBoxRtn = 6 Then
        xPicSize = InputBox("Input the height and width of the picture, separated by comma", "Kutools for Word", "")
    End If
    For Each xShape In ActiveDocument.InlineShapes
      xShape.Height = Split(xPicSize, ",")(0)
      xShape.Width = Split(xPicSize, ",")(1)
    Next xShape
End Sub

3. And then, press F5 key to run this code, a Browse window is displayed, please select the folder that contains the images you want to insert, see screenshot:

doc insert images with same size 1

4. Then click OK button, and a promptf box is popped out to remind you if you want to resize the pictures, see screenshot:

doc insert images with same size 2

5. Click Yes, and type the size numbers of the height and width which are separated by comma into the text box, see screenshot:

doc insert images with same size 3

6. And then click OK, all the inserted images have been rearranged as the same size, see screenshot:

doc insert images with same size 4

Note: the unit size is pond in VBA code.


Resize all pictures to the same size based on a specific image with Kutools for Word

If multiple pictures exist in your Word document, with Kutools for Word’s Resize Images utility, you can quickly resize all images as same as the specific one.

Kutools for Word : with more than 100 handy Word add-ins, free to try with no limitation in 60 days. 

After installing Kutools for Word, please do as this:

1. Adjust one picture to the size you want, and then select it, then click Enterprise > Resize Images > Resize Images with Selection, see screenshot:

doc insert images with same size 5

2. And all images in this word document have been resized as same as the selected one immediately, see screenshot:

doc insert images with same size 6

Click to download Kutools for Word and free trial now!


Kutools for Word

More than 100 Advanced Functions for Word 2003, 2007, 2010, 2013, 2016 and 2019

shot-kutools-700-225-kte

More Features  |  Free Download  |  Only $39.00 for hundreds of functions

Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.