Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Word Resizing Picture

Status
Not open for further replies.

dprayner

Programmer
Oct 14, 2002
140
US
Hi people. I was wondering if anyone know the simplest commands to resize an image in the body of a Word Document.
I know you can go into the settings manually and select Format Picture --> Size --> Height. I want the picture to be at 100%. Thank you, DAVE
 
ASssuming it is int first in the InlineShapes collection:

Code:
With ActiveDocument.InlineShapes(1)
    .ScaleHeight = 100
    .ScaleWidth = 100
End With

Gerry
 
Thank you. It looks like that will do the trick. DAVE
 
Hi Gerry. I am getting a Run-time error '5941': The requested member of the collection doesn't exist. Any suggestions? DAVE
 
Hi Gerry. I had the code in the wrong place. I changed the .InlineShapes() from1 to 0 also. Seems to work great. Thanks, DAVE
 
Well you DO have to be using the correct index number....

Gerry
 
Of course. I was just unfamiliar with the command.
 
Oh, sorry, I certainly was not intending to be critical in any way.

Gerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top