CanvasShapes.AddShape Method
Word Developer Reference |
Adds an AutoShape to a drawing canvas. Returns a Shape object that represents the AutoShape.
Syntax
expression.AddShape(Type, Left, Top, Width, Height)
expression Required. A variable that represents a CanvasShapes collection.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
Type | Required | Long | The type of shape to be returned. Can be any MsoAutoShape 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. |
Remarks
To change the type of an AutoShape that you've added, set the AutoShapeType property.
Example
This example creates a new canvas in the active document and adds a circle to the canvas.
Visual Basic for Applications |
---|
|
See Also