CanvasShapes Collection
Word Developer Reference |
Use the CanvasItems property of either a Shape or ShapeRange object to return a CanvasShapes collection.
Remarks
To add shapes to a drawing canvas, use the following methods of the CanvasShapes collection: AddCallout , AddConnectorAddCurve , AddLabel , AddLine , AddPicture , AddPolyline , AddShape , AddTextbox , AddTextEffect , or BuildFreeform. The following example adds a drawing canvas to the active document and then adds three shapes to the drawing canvas.
Visual Basic for Applications |
---|
|
Use CanvasItems(index), where index is the name or the index number, to return a single shape in the CanvasShapes collection. The following example sets the Line and Fill properties and vertically flips the third shape in a drawing canvas.
Visual Basic for Applications |
---|
|
Each shape is assigned a default name when it is created. For example, if you add three different shapes to a document, they might be named Rectangle 2, TextBox 3, and Oval 4. Use the Name property to reference the default name or to assign a more meaningful name to a shape.
See Also