Skip to content

Latest commit

 

History

History
66 lines (37 loc) · 1.95 KB

PowerPoint.Slides.FindBySlideID.md

File metadata and controls

66 lines (37 loc) · 1.95 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Slides.FindBySlideID method (PowerPoint)
vbapp10.chm530004
vbapp10.chm530004
PowerPoint.Slides.FindBySlideID
49c5cb57-e132-0539-ecfd-25321ac7cc32
06/08/2017
medium

Slides.FindBySlideID method (PowerPoint)

Returns a Slide object that represents the slide with the specified slide ID number. Each slide is automatically assigned a unique slide ID number when it is created. Use the SlideID property to return a slide's ID number.

Syntax

expression. FindBySlideID( _SlideID_ )

expression A variable that represents a Slides object.

Parameters

Name Required/Optional Data type Description
SlideID Required Long Specifies the ID number of the slide you want to return. Microsoft PowerPoint assigns this number when the slide is created.

Return value

Slide

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 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

Slides Object

[!includeSupport and feedback]