View Single Post
 
Old 10-04-2021, 11:15 AM
James Martin James Martin is offline Windows 10 Office 2019
Novice
 
Join Date: Sep 2021
Posts: 7
James Martin is on a distinguished road
Default

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
Reply With Quote