Select Method

Microsoft PowerPoint Visual Basic

ShowSelect method as it applies to the Cell, Column, Row, Slide, SlideRange, and TextRange objects.

Selects the specified object.

expression.Select

expression    Required. An expression that returns one of the above objects.

ShowSelect method as it applies to the Shape and ShapeRange objects.

Selects the specified object.

expression.Select(Replace)

expression    Required. An expression that returns one of the above objects.

Replace   Optional MsoTriState. Specifies whether the selection replaces any previous selection.

MsoTriState can be one of these MsoTriState constants.
msoCTrue
msoFalse The selection is added to the previous selection.
msoTriStateMixed
msoTriStateToggle
msoTrue Default. The selection replaces any previous selection.

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.

Example

ShowAs it applies to the Cell, Column, Row, Slide, SlideRange, and TextRange objects

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
				

This example selects a table that has been added to a new slide in a new presentation. The table has three rows and three columns.

With Presentations.Add.Slides
    .Add(1, ppLayoutBlank).Shapes.AddTable(3, 3).Select
End With
				

ShowAs it applies to the Shape and ShapeRange objects.

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