setting the width for a picture in a macro

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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", _
 
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

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Back
Top