A
andu
Hi all,
I'm a VBA newbie.
I inserted a polygonal picture into a text with a code like this:
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?
I'm a VBA newbie.
I inserted a polygonal picture into a text with a code like this:
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?