Function Reference

_PPT_SlideList

Returns a list of Slides in a Presentation.

#Include <PowerPoint.au3>
_PPT_SlideList($oPresentation)

 

Parameters

$oPresentation Presentation object.

 

Return Value

Success: a two-dimensional zero based array with the following information:
    0 - Object of the Slide
    1 - Property SlideID: a unique ID number
    2 - Property SlideIndex: index number of the slide within the Slides collection
    3 - Property SlideNumber: slide number
    4 - Property Name: name of the slide (format: Slide n when created by PowerPoint or user
    5 - Property HasNotePages: Indicates whether the Slide has media that resides on a notes page
    6 - Property Hidden: Determines whether the specified slide is hidden during a slide show
Failure: 0 and sets @error.
    1 - $oPPT is not an object or not an application object

 

Remarks

For SlideID, SlideIndex and SlideNumber values please see:
https://docs.microsoft.com/en-us/office/vba/api/powerpoint.slide.slideid
https://docs.microsoft.com/en-us/office/vba/api/powerpoint.slide.slideindex
https://docs.microsoft.com/en-us/office/vba/api/powerpoint.slide.slidenumber

 

Related

_PPT_PresentationList, _PPT_ShapeList

 

Example


#AutoIt3Wrapper_AU3Check_Parameters= -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#AutoIt3Wrapper_AU3Check_Stop_OnWarning=N
#include <PowerPoint.au3>
#include <MsgBoxConstants.au3>
#include <Array.au3>

; *************************
; Create application object
; *************************
Global $oPPT = _PPT_Open()
If @error Then Exit MsgBox($MB_ICONERROR, "PowerPoint UDF: _PPT_SlideList Example", "Error creating the PowerPoint application object." & @CRLF & "@error = " & @error & ", @extended = " & @extended)

; ***********************
; Open a presentation
; ***********************
Global $sPresentation = @ScriptDir & "\Presentation1.pptx"
Global $oPresentation = _PPT_PresentationOpen($oPPT, $sPresentation, True)
If @error Then Exit MsgBox($MB_ICONERROR, "PowerPoint UDF: _PPT_SlideList Example", "Error opening presentation '" & $sPresentation & "'." & @CRLF & "@error = " & @error & ", @extended = " & @extended)

; ****************************************
; List the slides for this presentation
; ****************************************
Global $aSlides = _PPT_SlideList($oPresentation)
If @error Then Exit MsgBox($MB_ICONERROR, "PowerPoint UDF: _PPT_SlideList Example 1", "Error listing Slides." & @CRLF & "@error = " & @error & ", @extended = " & @extended)
_ArrayDisplay($aSlides, "PowerPoint UDF: _PPT_SlideList Example 1 - List of Slides")