Class CanvasShapes (Word VBA)

Use the CanvasItems property of either a Shape or ShapeRange object to return a CanvasShapes collection.

Class Shape gives access to class CanvasShapes.

To use a CanvasShapes class variable it first needs to be instantiated, for example

Dim css as CanvasShapes
Set css = ActiveDocument.Background.CanvasItems

The following procedures can be used to set variables of type CanvasShapes: Shape.CanvasItems and ShapeRange.CanvasItems.

Methods

AddCallout - Adds a borderless line callout to a drawing canvas. Returns a Shape object that represents the callout.

AddConnector - Returns a Shape object that represents a connecting line between two shapes in a drawing canvas.

AddCurve - Returns a Shape object that represents a B├ęzier curve in a drawing canvas.

AddLabel - Adds a text label to a drawing canvas. Returns a Shapes object that represents the text label.

AddLine - Adds a line to a drawing canvas. Returns a Shape object that represents the line and adds it to the CanvasShapes collection.

AddPicture - Adds a picture to a drawing canvas. Returns a Shape object that represents the picture and adds it to the CanvasShapes collection.

AddPolyline - Adds an open or closed polygon to a drawing canvas. Returns a Shape object that represents the polygon.

AddShape - Adds an AutoShape to a drawing canvas. Returns a Shape object that represents the AutoShape.

AddTextbox - Adds a text box to a drawing canvas. Returns a Shape object that represents the text box.

AddTextEffect - Adds a WordArt shape to a drawing canvas. Returns a Shape object that represents the WordArt.

BuildFreeform - Builds a freeform object. Returns a FreeformBuilder object that represents the freeform as it is being built.

Item - Returns an individual Shape object in a collection.

Range - Returns a ShapeRange object.

SelectAll - Selects all the shapes in a canvas.

Properties

Count returns a Long that represents the number of canvas shapes in the specified collection.