Does anyone know if the create object method of opening up office apps exposes any methods, objects or properties with power point. Can a script be written that would open up the PPT file and go directly to the slide show? aspvbwannab
Ensure that you have a reference set to the Microsoft Powerpoint Object and Microsoft Office Object Libraries
Here's an example code, you'll need to tweak on the settings to make it more applicable toward your needs. I didn't add any of the event handling code.
Dim appPPT As PowerPoint.Application
Dim presPPT As PowerPoint.Presentation
On Error Resume Next
Set appPPT = GetObject(, "Powerpoint.Application"
If Err.Number <> 0 Then
Err.Clear
Set appPPT = CreateObject("Powerpoint.Application"
End If
On Error GoTo ErrorHandler
Set presPPT = appPPT.Presentations.Open("c:\Test.ppt", msoTrue, msoFalse, msoFalse)
appPPT.Visible = True
With presPPT.SlideShowSettings
.StartingSlide = 1
.EndingSlide = 1
.RangeType = ppShowSlideRange
.AdvanceMode = ppSlideShowUseSlideTimings
.LoopUntilStopped = True
.Run
End With Neil Konitzer, President
Freisoft
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.