Does anyoone know how to run a Power point presentation and when is done close PowerPoint.
I have this code:
Private Sub Command1_Click()
Dim ppt As Object
Dim pptFile As String
Dim reply, promt
promt = "PRESS SPACEBAR TO MOVE FROM SLIDE TO SLIDE" & _
" IN THE PRESENTATION." & vbCrLf & " " & vbCrLf & "READY TO START?"
reply = MsgBox(promt, vbYesNo, "Amazing Powerpoint"
If reply = vbYes Then
Set ppt = CreateObject("PowerPoint.Application"
ppt.Visible = True
pptFile = App.Path & "\Thermal.ppt"
ppt.presentations.Open pptFile
'ppt.ActivePresentation.SlideShowSettings.Run
With ppt.ActivePresentation.SlideShowSettings
'.StartingSlide = 1
'.EndingSlide = 4
'For I = .StaringSlide to .endingSlide
'.RangeType = ppShowSlideRange
'.AdvanceMode = ppSlideShowUseSlideTimings
'.Run
'.LoopUntilStopped = True
Do
.Run
Loop While .LoopUntilStopped = True
'ppt.Quit
End
End With
'If ppt.ActivePresentation.LoopUntilStopped = True Then
'ppt.Quit
'End If
'Set ppt = Nothing
End If
End Sub
As you can see I been comments some lines trying to make this work if someone have some ideas let me know.
Thanks
I have this code:
Private Sub Command1_Click()
Dim ppt As Object
Dim pptFile As String
Dim reply, promt
promt = "PRESS SPACEBAR TO MOVE FROM SLIDE TO SLIDE" & _
" IN THE PRESENTATION." & vbCrLf & " " & vbCrLf & "READY TO START?"
reply = MsgBox(promt, vbYesNo, "Amazing Powerpoint"
If reply = vbYes Then
Set ppt = CreateObject("PowerPoint.Application"
ppt.Visible = True
pptFile = App.Path & "\Thermal.ppt"
ppt.presentations.Open pptFile
'ppt.ActivePresentation.SlideShowSettings.Run
With ppt.ActivePresentation.SlideShowSettings
'.StartingSlide = 1
'.EndingSlide = 4
'For I = .StaringSlide to .endingSlide
'.RangeType = ppShowSlideRange
'.AdvanceMode = ppSlideShowUseSlideTimings
'.Run
'.LoopUntilStopped = True
Do
.Run
Loop While .LoopUntilStopped = True
'ppt.Quit
End
End With
'If ppt.ActivePresentation.LoopUntilStopped = True Then
'ppt.Quit
'End If
'Set ppt = Nothing
End If
End Sub
As you can see I been comments some lines trying to make this work if someone have some ideas let me know.
Thanks