Upravit

Sdílet prostřednictvím


Shapes.AddShape method (Word)

Adds an AutoShape to a document. Returns a Shape object that represents the AutoShape and adds it to the Shapes collection.

Syntax

expression. AddShape( _Type_ , _Left_ , _Top_ , _Width_ , _Height_ )

expression Required. A variable that represents a Shapes object.

Parameters

Name Required/Optional Data type Description
Type Required Long The type of shape to be returned. Can be any MsoAutoShapeType constant.
Left Required Single The position, measured in points, of the left edge of the AutoShape.
Top Required Single The position, measured in points, of the top edge of the AutoShape.
Width Required Single The width, measured in points, of the AutoShape.
Height Required Single The height, measured in points, of the AutoShape.

Return value

Shape

Remarks

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

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.