SelectAll Method

Selects all the shapes in the main story, in a canvas, or in headers and footers of a document.


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


This method doesn't select InlineShape objects.


This example selects all the shapes in the active document.

Sub SelectAllShapes()
End Sub

This example selects all the shapes in the headers and footers of the active document and adds a red shadow to each shape.

Sub SelectAllHeaderShapes()
    With ActiveDocument.ActiveWindow
        .View.Type = wdPrintView
        .ActivePane.View.SeekView = wdSeekCurrentPageHeader
    End With


    With Selection.ShapeRange.Shadow
        .Type = msoShadow10
        .ForeColor.RGB = RGB(220, 0, 0)
    End With
End Sub

This example selects and deletes all the shapes inside the first canvas of the active document.

Sub SelectCanvasShapes()
    Dim s As Shape
    Set s = ActiveDocument.Shapes.Range(1)
End Sub

Applies to | CanvasShapes Collection | DiagramNodeChildren Collection | DiagramNodes Collection | Editor Object | Shapes Collection Object

See Also | Select Method | Selection Object