ConvertToShape Method

Microsoft Excel Visual Basic

ConvertToShape Method

       

Creates a shape that has the geometric characteristics of the specified FreeformBuilder object. Returns a Shape object that represents the new shape.

Note   You must apply the AddNodes method to a FreeformBuilder object at least once before you use the ConvertToShape method.

expression.ConvertToShape

expression   Required. An expression that returns a FreeformBuilder object.

Example

This example adds a freeform with five vertices to myDocument.

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