Compartilhar via


Slides.FindBySlideID Method

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.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
Function FindBySlideID ( _
    SlideID As Integer _
) As Slide
'Usage
Dim instance As Slides
Dim SlideID As Integer
Dim returnValue As Slide

returnValue = instance.FindBySlideID(SlideID)
Slide FindBySlideID(
    int SlideID
)

Parameters

  • SlideID
    Type: System.Int32
    Specifies the ID number of the slide you want to return. Microsoft PowerPoint assigns this number when the slide is created.

Return Value

Type: Microsoft.Office.Interop.PowerPoint.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[Object] method with the slide's index number.

See Also

Reference

Slides Interface

Slides Members

Microsoft.Office.Interop.PowerPoint Namespace