It seems to be fairly easy to ensure that pictures are always reduced to a
certain size (e.g. the INCLUDEPICTURE field in an old-style Word Frame that
is the maximum size you want, then merge to a new document, then select the
document using control-A, then update the images using F9. You probably need
to remove any \*MERGEFORMAT switch in the INCLUDEPICTURE field.
However, that does not increase the size of pictures that are smaller than
the frame. To make all the pictures the same size,
a. you do not need the Frame
b. merge to a new document then run the following macro.
Sub adjustpictures()
Dim objShape As Word.InlineShape
Dim intWidth As Integer
DIm intHeight As Integer
' Set these to the values you want
intWidth = 100
intHeight = 60
ActiveDocument.Fields.Update
For Each objShape In ActiveDocument.InlineShapes
objShape.Width = intWidth
objShape.Height = intHeight
Next
End Sub
Unfortunately, that will distort any image whose sides are not in the ratio
100:60 so you could try the following to pick up the existing ratio for each
image:
Sub adjustpictures()
Dim objShape As Word.InlineShape
Dim dblSourceWidth As Double
Dim dblSourceHeight As Double
Dim dblTargetWidth As Double
Dim dblTargetHeight As Double
Dim dblWidthRatio As Double
Dim dblHeightRatio As Double
' Set these to the maximum values you want
dblTargetWidth = 100
dblTargetHeight = 60
ActiveDocument.Fields.Update
For Each objShape In ActiveDocument.InlineShapes
dblSourceWidth = objShape.Width
dblWidthRatio = dblSourceWidth / dblTargetWidth
dblSourceHeight = objShape.Height
dblHeightRatio = dblSourceHeight / dblTargetHeight
If dblWidthRatio > dblHeightRatio Then
objShape.Width = CInt(dblTargetWidth)
objShape.Height = CInt(dblTargetWidth * (dblSourceHeight /
dblSourceWidth))
Else
objShape.Height = CInt(dblTargetHeight)
objShape.Width = CInt(dblTargetHeight * (dblSourceWidth /
dblSourceHeight))
End If
Next
End Sub
Peter Jamieson