ConvertToShape Method

Applies To

FreeformBuilder object, InlineShape object.

Description

InlineShape object: Converts an inline shape to a free-floating shape. Returns a Shape object that represents the new shape.

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

Syntax 1

expression.ConvertToShape

Syntax 2

expression.ConvertToShape(Anchor)

expression   An expression that returns an InlineShape object (Syntax 1) or a FreeformBuilder object (Syntax 2).

Anchor Optional Variant. A Range object that represents the text that the shape is bound to. If Anchor is specified, the anchor is positioned at the beginning of the first paragraph in the anchoring range. If this argument is omitted, the anchoring range is selected automatically and the shape is positioned relative to the top and left edges of the page.

Remarks

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

See Also

InlineShapes collection object, Shapes collection object.

Example

This example converts the first inline shape in the active document to a floating shape.

ActiveDocument.InlineShapes(1).ConvertToShape
This example adds a freeform with five vertices to myDocument.

Set myDocument = ActiveDocument
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