Share via


FreeformBuilder Object

FreeformBuilder Object
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Shapes
Aa661995.parchild(en-us,office.10).gifFreeformBuilder
Aa661995.space(en-us,office.10).gifAa661995.parchild(en-us,office.10).gifShape

Represents the geometry of a freeform while it's being built.

Using the FreeformBuilder Object

Use the BuildFreeform method of the Shapes collection to return a FreeformBuilder object. Use the AddNodes method to add nodes to the freeform. Use the ConvertToShape method to create the shape defined in the FreeformBuilder object and add it to the Shapes collection. The following example adds a freeform with four segments to the active document.

  Sub CreateNewFreeFormShape()
    With ActiveDocument.Pages(1).Shapes.BuildFreeform( _
            EditingType:=msoEditingCorner, X1:=360, Y1:=200)
        .AddNodes SegmentType:=msoSegmentCurve, _
            EditingType:=msoEditingCorner, X1:=380, Y1:=230, _
            X2:=400, Y2:=250, X3:=450, Y3:=300
        .AddNodes SegmentType:=msoSegmentCurve, _
            EditingType:=msoEditingAuto, X1:=480, Y1:=200
        .AddNodes SegmentType:=msoSegmentLine, _
            EditingType:=msoEditingAuto, X1:=480, Y1:=400
        .AddNodes SegmentType:=msoSegmentLine, _
            EditingType:=msoEditingAuto, X1:=360, Y1:=200
        .ConvertToShape
    End With
End Sub