BuildFreeform Method

Microsoft PowerPoint Visual Basic

object that represents the freeform as it is being built. Use the AddNodes method to add segments to the freeform. After you have added at least one segment to the freeform, you can use the ConvertToShape method to convert the FreeformBuilder object into a Shape object that has the geometric description you've defined in the FreeformBuilder object.

expression.BuildFreeform(EditingType, X1, Y1)

expression    Required. An expression that returns one of the objects in the Applies To list.

EditingType   Required MsoEditingType. The editing property of the first node.

MsoEditingType can be one of the following MsoEditingType constants (cannot be msoEditingSmooth or msoEditingSymmetric).
msoEditingAuto
msoEditingCorner

X1    Required Single. The horizontal position, measured in points, of the first node in the freeform drawing relative to the left edge of the slide.

Y1    Required Single. The vertical position, measured in points, of the first node in the freeform drawing relative to the top edge of the slide.

Example

This example adds a freeform with four segments to myDocument.

Set myDocument = ActivePresentation.Slides(1)
With myDocument.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