setting the width for a picture in a macro

G

Guest

I have the following macro:

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 2/14/2006 by Darin E. Palacky
'
Selection.InlineShapes.AddPicture FileName:= _
"F:\Documents and Settings\All Users\Documents\Darin\Signature.jpg", _
LinkToFile:=False, SaveWithDocument:=True


How do i set the width and the height for this picture?
 
T

Tony Jollans

Try this ...

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 2/14/2006 by Darin E. Palacky
'
Set Pic = Selection.InlineShapes.AddPicture (FileName:= _
"F:\Documents and Settings\All Users\Documents\Darin\Signature.jpg",
_
LinkToFile:=False, SaveWithDocument:=True)
Pic.Width = 200
Pic.Height = 200



--
Enjoy,
Tony


Darin Palacky said:
I have the following macro:

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 2/14/2006 by Darin E. Palacky
'
Selection.InlineShapes.AddPicture FileName:= _
"F:\Documents and Settings\All
Users\Documents\Darin\Signature.jpg", _
 
G

Graham Mayor

Alternatively insert the picture in the document at the size you require and
save it as a formatted autocorrect entry along with any associated text for
(say) #dp or
Save it as an autotext entry and use your macro to insert the autotext entry

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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