I'm testing this, so far ok. May need to exempt TIFF files that we occasionally get from customers as additional pages can be hidden.
Sub ResizePicturesWithinMarginIF()
Dim oDoc As Document, oShape As InlineShape
Set oDoc = Application.ActiveDocument
For Each oShape in oDoc.inlineShapes
If oShape.Width > 510 Then
oShape.LockAspectRatio = True
oShape.Width = 510
End If
If oShape.Height > 660 Then
oShape.LockAspectRatio = True
oShape.Height = 660
End If
Next
Set oDoc = Nothing
End Sub
|