Function Reference

_PPT_SlideShow

Set properties for a slide show and run the show.

#Include <PowerPoint.au3>
_PPT_SlideShow($oPresentation[, $bRun = True[, $vStartingSlide = 1[, $vEndingSlide = Default[, $bLoop = True[, $iShowType = $ppShowTypeKiosk]]]]])

 

Parameters

$oPresentation Presentation object.
$bRun [optional] If True then the function starts the slide show (default = True).
$vStartingSlide [optional] Name or index of the first slide to be shown (default = 1).
$vEndingSlide [optional] Name or index of the last slide to be shown (default = keyword Default = the last slide in the presentation).
$bLoop [optional] If True then the slide show starts again when having reached the end (default = True).
$iShowType [optional] Type of slide show defined by the PpSlideShowType enumeration (default = $ppShowTypeKiosk).

 

Return Value

Success: the slidewindow object when $bRun = True, else 1.
Failure: 0 and sets @error.
    1 - $oPresentation is not an object or not a presentation object
    2 - $vStartingSlide is a number and < 1 or > current number of slides
    3 - $vEndingSlide is a number and < 1 or > current number of slides
    4 - Error occurred when running the slide show. @extended is set to the COM error code returned by the Run method

 

Remarks

None.

 

Related

 

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>

; *************************************************
; Create application object and open a presentation
; *************************************************
Global $oPPT = _PPT_Open()
If @error Then Exit MsgBox($MB_ICONERROR, "PowerPoint UDF: _PPT_SlideShow Example", "Error creating the PowerPoint application object." & @CRLF & "@error = " & @error & ", @extended = " & @extended)
; Open presentation
Global $sPresentation = @ScriptDir & "\Presentation1.pptx"
Global $oPresentation = _PPT_PresentationOpen($oPPT, $sPresentation)
If @error Then
    MsgBox($MB_ICONERROR, "PowerPoint UDF: _PPT_SlideShow Example", "Error opening presentation '" & $sPresentation & "'." & @CRLF & "@error = " & @error & ", @extended = " & @extended)
    _PPT_Close($oPPT)
    Exit
EndIf

; ***********************************************************************************************
; Run slide show and display slides 2 and 3 in a permanent loop. Display the show in Speaker mode
; ***********************************************************************************************
_PPT_SlideShow($oPresentation, True, 2, 3, True, $ppShowTypeSpeaker)
If @error Then Exit MsgBox($MB_ICONERROR, "PowerPoint UDF: _PPT_SlideShow Example 1", "Error running slid show." & @CRLF & "@error = " & @error & ", @extended = " & @extended)
MsgBox($MB_ICONINFORMATION, "PowerPoint UDF: _PPT_SlideShow Example 1", "Slide show started.")