Shapes.BuildFreeform method (PowerPoint)

Builds a freeform object. Returns a FreeformBuilder object that represents the freeform as it is being built.

Syntax

expression. BuildFreeform( _EditingType_, _X1_, _Y1_ )

expression A variable that represents a Shapes object.

Parameters

Name Required/Optional Data type Description
EditingType Required MsoEditingType The editing property of the first node.
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.

Return value

FreeformBuilder

Remarks

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.

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

See also

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.