using VBA macro code to re-size image

S

sdm

If you have a picture embedded in a Word document, is there any way to
re-size it using VBA macro code
 
J

Jean-Guy Marcil

S

sdm

I wonder if the following block of code will work:

ActiveDocument.Shapes(22).Select
With Selection.ShapeRange
.ScaleHeight 1.1, msoFalse, msoScaleFromTopLeft
.ScaleWidth 1.1, msoFalse, msoScaleFromTopLeft
.Left = wdShapeCenter
End With
 
J

Jean-Guy Marcil

sdm was telling us:
sdm nous racontait que :
I wonder if the following block of code will work:

ActiveDocument.Shapes(22).Select
With Selection.ShapeRange
.ScaleHeight 1.1, msoFalse, msoScaleFromTopLeft
.ScaleWidth 1.1, msoFalse, msoScaleFromTopLeft
.Left = wdShapeCenter
End With

Have you tried it?

How do you know that it is the 22nd shape you want to resize?
How were the shape inserted?
By you in the template?
By the user when editing the document?

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

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