With ActiveDocument.Shapes.BuildFreeform(msoEditingAuto, 342#, 117#)
.AddNodes msoSegmentLine, msoEditingAuto, 297#, 198#
.AddNodes msoSegmentLine, msoEditingAuto, 324#, 288#
.AddNodes msoSegmentLine, msoEditingAuto, 423#, 315#
.AddNodes msoSegmentLine, msoEditingAuto, 504#, 270#
.AddNodes msoSegmentLine, msoEditingAuto, 522#, 162#
.AddNodes msoSegmentLine, msoEditingAuto, 486#, 126#
.AddNodes msoSegmentLine, msoEditingAuto, 342#, 117#
.ConvertToShape.Select
End With
Selection.ShapeRange.Fill.UserPicture "mypath\.mypicture.jpg"
But I don't like that the filled picture is streched somehow in the drawn
shape.
I know that whan doing this from UI there is a checkbox "Lock Picture Aspect
Ration"
that does what I need but how to do it from script?
"andu" <alexa...@bumerang.ro> wrote in message
news:ekkuNjDe...@TK2MSFTNGP05.phx.gbl...
"Jezebel" <warc...@whitehouse.gov> wrote in message
news:OqWi0$GeGHA...@TK2MSFTNGP02.phx.gbl...
"Selection.ShapeRange.LockAspectRatio = msoTrue" is the equivalent of
checking this:
right click on the form/Format AutoShape/Size Tab/Lock Aspect Ratio
Best regards,
Alexandru.
"andu" <alexa...@bumerang.ro> wrote in message
news:u3BFlLMe...@TK2MSFTNGP04.phx.gbl...
Regards,
Alexandru.
"LGFN" <LG...@discussions.microsoft.com> wrote in message
news:5DA3A940-F1DA-40DF...@microsoft.com...
Regards,
Alexandru.
"andu" <alexa...@bumerang.ro> wrote in message
news:uoaGPnXe...@TK2MSFTNGP03.phx.gbl...
The Selection.ShapeRange.LockAspectRatio property refers to the polygonal
shape created by the drawn lines, not to the picture used to fill it. The
.ShapeRange.Fill property returns a FillFormat object, which has a number of
properties, but none of them have anything to do with its aspect ratio.
One thing I've noticed is that the distortion seems to affect only pictures
that are smaller than the drawn shape; ones that are larger than the shape
are just clipped. If you have the freedom to do so, you can use a graphics
program to embed the smaller picture in a blank background large enough to
fill the shape.
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.