Option Explicit'Change the five constant values below to suit'*****************************************************************Const ppFileName As String = "my documents\your PP folder\your PP.pps"Const numSlides As Integer = 10 'number of slides in the showConst exposureTime As Integer = 2000 'exposure time in millisecondsConst ZStartPoint As Double = 0.0 'where Z starts fromConst ZIncrement As Double = 0.005 'the Z increment'*****************************************************************Dim objPPTDim objPresentationDim s As IntegerSet objPPT = CreateObject("PowerPoint.Application")objPPT.Visible = TrueSet objPresentation = objPPT.Presentations.Open(ppFileName)Code "G90" 'absolute distance modeWhile IsMoving()  sleep 10WendCode "G0 Z" & ZStartPoint 'start Z at whereverWhile IsMoving()  sleep 10WendCode "G91" 'incremental distance modeWhile IsMoving()  sleep 10WendFor s=1 To numSlides  Code "G1 Z" & ZIncrement + ZIncrement 'lift Z a couple of tads  While IsMoving()    sleep 10  Wend  Code "G1 Z-" & ZIncrement 'lower Z a tad  While IsMoving()    sleep 10  Wend  objPresentation.SlideShowWindow.View.GotoSlide (s) 'show the next slide  sleep exposureTimeNextCode "G90" 'back to absolute distance modeobjPresentation.CloseobjPPT.Quit  