SlideNumber Property Example

This example shows how changing the first slide number affects the slide number of a specific slide.

With Application.ActivePresentation
    .PageSetup.FirstSlideNumber = 1   'starts slide numbering at 1
    MsgBox .Slides(2).SlideNumber     'returns 2

    .PageSetup.FirstSlideNumber = 10  'starts slide numbering at 10
    MsgBox .Slides(2).SlideNumber     'returns 11
End With

This example hides the slide number on slide two in the active presentation if the number is currently visible, or it displays the slide number if it's currently hidden.

With Application.ActivePresentation.Slides(2) _
        .HeadersFooters.SlideNumber
    If .Visible Then
        .Visible = False
    Else
        .Visible = True
    End If
End With