Hi,
I generate word (2003) documents with several imported pictures.
But these pictures are to large so I have to change the size to 80% by hand.
How can I automatic change the size for all pictures in the file?
I have tried to record a macro to do this, but during this recording I can't
select any pictures in the document. I don't understand why.
Best regards,
/Sören
Helmut Weber - 11 Jan 2008 14:16 GMT
Hi Sören,
your pictures are probably inlineshapes.
If so, try:
Sub Test6778a()
Dim oInl As InlineShape
For Each oInl In ActiveDocument.InlineShapes
' for testing
' MsgBox "x = " & Format(oInl.Width, "#") & _
Chr (13) & "y = " & Format(oInl.Height, "#")
oInl.Width = oInl.Width * 0.8
oInl.Height = oInl.Height * 0.8
Next
End Sub
There is also .scalewidth and .scaleheight,
but it's difficult to apply and help is misleading.
--
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Vista Small Business, Office XP