Shapes.BuildFreeform method (Word)

Builds a freeform object.

Syntax

expression. BuildFreeform( _EditingType_ , _X1_ , _Y1_ )

expression Required. 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 position (in points) of the first node in the freeform drawing relative to the left edge of the document.
Y1 Required Single The position (in points) of the first node in the freeform drawing relative to the top edge of the document.

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 five vertices to the active document.

Dim docActive As Document 
 
Set docActive = ActiveDocument 

With docActive.Shapes.BuildFreeform(msoEditingCorner, 360, 200) 
 .AddNodes msoSegmentCurve, msoEditingCorner, _ 
 380, 230, 400, 250, 450, 300 
 .AddNodes msoSegmentCurve, msoEditingAuto, 480, 200 
 .AddNodes msoSegmentLine, msoEditingAuto, 480, 400 
 .AddNodes msoSegmentLine, msoEditingAuto, 360, 200 
 .ConvertToShape 
End With

See also

Shapes Collection Object

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.