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
[email protected]
Word MVP site: http://www.word.mvps.org
 
Top