Automatic size change on all imported pictures

  • Thread starter Sören_Marodören
  • Start date
S

Sören_Marodören

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
 
H

Helmut Weber

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top