Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Darin Palacky
 
Posts: n/a
Default setting the width for a picture in a macro

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?


  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Tony Jollans
 
Posts: n/a
Default setting the width for a picture in a macro

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" Darin wrote in message
...
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?




  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor
 
Posts: n/a
Default setting the width for a picture in a macro

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
Word MVP web site http://word.mvps.org


Tony Jollans wrote:
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




"Darin Palacky" Darin wrote in
message ...
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?



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting text field width as wide as page Scott Steiner Page Layout 7 February 7th 06 12:24 PM
Pause macro to select a picture Varls New Users 0 July 18th 05 12:20 PM
Format Picture Macro Raymond O'Neill Microsoft Word Help 1 March 3rd 05 10:35 PM
setting cell width Hilary Microsoft Word Help 1 February 15th 05 09:31 AM
Setting width of pull-down menus? fastandfuriousbutbreakindown Microsoft Word Help 3 January 1st 05 05:12 AM


All times are GMT +1. The time now is 07:16 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"