AddShape Method

         Example         Applies To

Creates an AutoShape. Returns a Shape object that represents the new AutoShape.

Syntax

expression.AddShape(Type, Left, Top, Width, Height)

expression   Required. An expression that returns a Shapes object.

Type   Required Long. Specifies the type of AutoShape to create. Can be any one of the MsoAutoShapeType constants.

Left, Top   Required Single. The position (in points) of the upper-left corner of the AutoShape's bounding box relative to the upper-left corner of the document.

Width, Height   Required Single. The width and height of the AutoShape's bounding box, in points.

Remarks

To change the type of an AutoShape that you’ve added, set the AutoShapeType property.