How to Apply a general Size to pictures in Microsoft Word 2007

2

Is it possible to apply a specific size to all the images in a microsoft Word 2007, while it's being edited. If so how can this be done. Thanks

hello

Posted 2012-04-15T09:47:32.837

Reputation: 139

Answers

3

Here's this awesome macro taken from this source. I've included it here in case the referenced link expires. You basically have to assign a shortcut and save this macro, then select all images in the document (by going to Styles and picking the assigned image style you have).

Sub AllPictSize()
    Dim PecentSize As Integer
    Dim oIshp As InlineShape
    Dim oshp As Shape

    PercentSize = InputBox("Enter percent of full size", "Resize Picture", 75)

    For Each oIshp In ActiveDocument.InlineShapes
        With oIshp
            .ScaleHeight = PercentSize
            .ScaleWidth = PercentSize
        End With
    Next oIshp

    For Each oshp In ActiveDocument.Shapes
        With oshp
            .ScaleHeight Factor:=(PercentSize / 100), _
              RelativeToOriginalSize:=msoCTrue
            .ScaleWidth Factor:=(PercentSize / 100), _
              RelativeToOriginalSize:=msoCTrue
        End With
    Next oshp
End Sub

Run the macro on the selected images, and specify a percentage of the largest image among the selected image. The default value is 75%, meaning that ALL images will be resized to 75% of the largest of the images.

NOTE: All selected items must be images for this macro to work, because Word can perform the resizing operations only on image objects. If the images do not resize correctly, check your styles and make all images consistent to their own unique style.

prrao

Posted 2012-04-15T09:47:32.837

Reputation: 1 007