View Single Post
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Brian Brian is offline
external usenet poster
 
Posts: 298
Default Help. Recording a Macro to resize maintaining aspect ratio

This code was given to me in answer to my question on the same subject by
Stefan

Sub PictSize()
Dim HieghtSize As Integer
Dim oIshp As InlineShape
Dim oshp As Shape
HeightSize = InputBox("Enter height ", "Resize Picture", 11)
For Each oIshp In ActiveDocument.InlineShapes
With oIshp
.LockAspectRatio = msoTrue
'Here's the modified line of code:
.Height = CentimetersToPoints(HeightSize)
End With
Next oIshp
End Sub

Hope it helps

--
Brian McCaffery


"Simon" wrote:

Hi there,

I have a document with lots of images that are too big. I am trying to
resize them all to 11cm wide and maintain the aspect ratio for the height.
I recorded a basic macro but the height is equal to whatever measurement was
in there when I recorded.

Any way around this please!!!

Thanks

Simon