FreeformBuilder.ConvertToShape method (Publisher)
Creates a shape that has the geometric characteristics of the specified FreeformBuilder object. Returns a Shape object that represents the new shape.
Syntax
expression.ConvertToShape
expression A variable that represents a FreeformBuilder object.
Return value
Shape
Remarks
You must apply the AddNodes method to a FreeformBuilder object at least once before you use the ConvertToShape method, or an error occurs.
Example
This example adds a freeform with four vertices to the first page in the active publication.
' Add a new freeform object.
With ActiveDocument.Shapes _
.BuildFreeform(EditingType:=msoEditingCorner, _
X1:=100, Y1:=100)
' Add three more nodes and close the polygon.
.AddNodes SegmentType:=msoSegmentCurve, _
EditingType:=msoEditingCorner, _
X1:=200, Y1:=200, X2:=225, Y2:=250, X3:=250, Y3:=200
.AddNodes SegmentType:=msoSegmentCurve, _
EditingType:=msoEditingAuto, X1:=200, Y1:=100
.AddNodes SegmentType:=msoSegmentLine, _
EditingType:=msoEditingAuto, X1:=150, Y1:=50
.AddNodes SegmentType:=msoSegmentLine, _
EditingType:=msoEditingAuto, X1:=100, Y1:=100
' Convert the polygon to a Shape object.
.ConvertToShape
End With
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.