B
BoomerM3
The following script (adaped from a MS example runs fine in PowerPoint
2002 but fails in 2003 (error noted in code comment). Two questions:
1. Can anyone help me get this to work in 2003?
2. Is it possible to modify this script so it will work in all versions
(or most versions)?
Thanks
peter
Const ppAdvanceOnTime = 2
Const ppShowTypeKiosk = 3
Const ppSlideShowDone = 5
Set objPPT = CreateObject("PowerPoint.Application")
objPPT.Visible = True
Set objPresentation = objPPT.Presentations.Open("d:\down\Nothing.pps")
objPresentation.Slides.Range.SlideShowTransition.AdvanceTime = 2
objPresentation.Slides.Range.SlideShowTransition.AdvanceOnTime = TRUE
objPresentation.SlideShowSettings.AdvanceMode = ppAdvanceOnTime
objPresentation.SlideShowSettings.ShowType = ppShowTypeKiosk
objPresentation.SlideShowSettings.StartingSlide = 1
objPresentation.SlideShowSettings.EndingSlide = _
objPresentation.Slides.Count
Set objSlideShow = objPresentation.SlideShowSettings.Run.View
'*** The "State" object not recognized in 2003 and PowerPoint
'*** wants to save changes in 2003 - not 2002
Do Until objSlideShow.State = ppSlideShowDone
Loop
'added to quit PPT
objPresentation.Close
objPPT.Quit
2002 but fails in 2003 (error noted in code comment). Two questions:
1. Can anyone help me get this to work in 2003?
2. Is it possible to modify this script so it will work in all versions
(or most versions)?
Thanks
peter
Const ppAdvanceOnTime = 2
Const ppShowTypeKiosk = 3
Const ppSlideShowDone = 5
Set objPPT = CreateObject("PowerPoint.Application")
objPPT.Visible = True
Set objPresentation = objPPT.Presentations.Open("d:\down\Nothing.pps")
objPresentation.Slides.Range.SlideShowTransition.AdvanceTime = 2
objPresentation.Slides.Range.SlideShowTransition.AdvanceOnTime = TRUE
objPresentation.SlideShowSettings.AdvanceMode = ppAdvanceOnTime
objPresentation.SlideShowSettings.ShowType = ppShowTypeKiosk
objPresentation.SlideShowSettings.StartingSlide = 1
objPresentation.SlideShowSettings.EndingSlide = _
objPresentation.Slides.Count
Set objSlideShow = objPresentation.SlideShowSettings.Run.View
'*** The "State" object not recognized in 2003 and PowerPoint
'*** wants to save changes in 2003 - not 2002
Do Until objSlideShow.State = ppSlideShowDone
Loop
'added to quit PPT
objPresentation.Close
objPPT.Quit