The following Visual Basic code demonstrates how
start a slide show by automating PowerPoint.
See Also: RunSlideShow
Sub StartSlideShow(ByVal
FileName
As String)
Dim PPT
As Object
Dim Pres
As Object
On Error Resume Next
Set PPT =
CreateObject("PowerPoint.Application")
Set Pres =
PPT.Presentations.Open(FileName,
False, False,
False)
If Pres.SlideShowWindow
Is Nothing Then
Pres.SlideShowSettings.Run
End If
End Sub
|
|