SlideShowSettings.NamedSlideShows Property

PowerPoint Developer Reference

Returns a NamedSlideShows collection that represents all the named slide shows (custom slide shows) in the specified presentation. Read-only.

Syntax

expression.NamedSlideShows

expression   A variable that represents a SlideShowSettings object.

Return Value
NamedSlideShows

Remarks

Each named slide show, or custom slide show, is a user-selected subset of the specified presentation.

Use the Add method of the NamedSlideShows object to create a named slide show.

Example

This example adds to the active presentation a named slide show "Quick Show" that contains slides 2, 7, and 9. The example then runs this slide show.

Visual Basic for Applications
  Dim qSlides(1 To 3) As Long
With ActivePresentation
    With .Slides
        qSlides(1) = .Item(2).SlideID
        qSlides(2) = .Item(7).SlideID
        qSlides(3) = .Item(9).SlideID
    End With
    With .SlideShowSettings
        .RangeType = ppShowNamedSlideShow
        .NamedSlideShows.Add "Quick Show", qSlides
        .SlideShowName = "Quick Show"
        .Run
    End With
End With

See Also