CanvasItems Property

Microsoft Word Visual Basic

CanvasItems Property

       

Returns a CanvasShapes object that represents a collection of shapes in a drawing canvas.

expression.CanvasItems

expression   Required. An expression that returns one of the objects in the Applies to list.

Example

This example creates a new drawing canvas in the active document and adds a circle to the canvas.

Sub NewCanvasShape()
    Dim shpCanvas As Shape
    Set shpCanvas = ActiveDocument.Shapes.AddCanvas( _
        Left:=100, Top:=75, Width:=150, Height:=200)
    shpCanvas.CanvasItems.AddShape _
        Type:=msoShapeOval, Top:=25, _
        Left:=25, Width:=150, Height:=150
End Sub