Select Method

Applies To

Shape object, ShapeRange collection object, Slide object, SlideRange collection object, TextRange object.

Description

Selects the specified object.

Syntax 1

expression.Select

expression Required. An expression that returns a Slide, SlideRange, or TextRange object.

Syntax 2

expression.Select(Replace)

expression Required. An expression that returns a Shape or ShapeRange object.

Replace Optional Long. True if the selection replaces any previous selection. False if the selection is added to the previous selection. True by default.

Remarks

If you try to make a selection that isn't appropriate for the view, your code will fail. For example, you can select a slide in slide sorter view but not in slide view.

See Also

SelectAll method, Selection object, Selection property, Unselect method.

Example

This example selects shapes one and three on slide one in the active presentation.

ActivePresentation.Slides(1).Shapes.Range(Array(1, 3)).Select
This example adds shapes two and four on slide one in the active presentation to the previous selection.

ActivePresentation.Slides(1).Shapes.Range(Array(2, 4)).Select False
This example selects the first five characters in the title of slide one in the active presentation.

ActivePresentation.Slides(1).Shapes.Title.TextFrame.TextRange _
    .Characters(1, 5).Select
This example selects slide one in the active presentation.

ActivePresentation.Slides(1).Select