Slide.SlideID property (PowerPoint)

Returns a unique ID number for the specified slide. Read-only.

Syntax

expression. SlideID

expression A variable that represents a Slide object.

Return value

Long

Remarks

Unlike the SlideIndex property, the SlideID property of a Slide object won't change when you add slides to the presentation or rearrange the slides in the presentation. Therefore, using the FindBySlideID method with the slide's ID number can be a more reliable way to return a specific Slide object from a Slides collection than using the Item method with the slide's index number.

Example

This example demonstrates how to retrieve the unique ID number for a Slide object and then use this number to return that Slide object from the Slides collection.

Set gslides = ActivePresentation.Slides

'Get slide ID
graphSlideID = gslides.Add(2, ppLayoutChart).SlideID

gslides.FindBySlideID(graphSlideID) _
    .SlideShowTransition.EntryEffect = _
    ppEffectCoverLeft      'Use ID to return specific slide

See also

Slide Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.