Share via


Shapes.SelectAll Method

Word Developer Reference

Selects all the shapes in a collection of shapes.

Syntax

expression.SelectAll

expression   Required. A variable that represents a Shapes collection.

Remarks

This method does not select InlineShape objects. You cannot use this method to select more than one canvas.

Example

This example selects all the shapes in the active document.

Visual Basic for Applications
  Sub SelectAllShapes()
    ActiveDocument.Shapes.SelectAll
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.

Visual Basic for Applications
  Sub SelectAllHeaderShapes()
    With ActiveDocument.ActiveWindow
        .View.Type = wdPrintView
        .ActivePane.View.SeekView = wdSeekCurrentPageHeader
    End With
ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Shapes.<strong class="bterm">SelectAll</strong>

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

End Sub

See Also