Run a Microsoft PowerPoint Slide Show

Demonstration script that runs a PowerPoint presentation named C:\Scripts\Process.ppt.

 
 
 
 
 
(0)
Add to favorites
Office
8/10/2009
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • how to repeat presentation + choose name of file
    1 Posts | Last post November 04, 2009
    • Const ppAdvanceOnTime = 2
      Const ppShowTypeKiosk = 3
      Const ppSlideShowDone = 5
      
      
      	Set objPPT = CreateObject("PowerPoint.Application")
      	objPPT.Visible = True
      ' открываем файл с именем сегодняшнего дня
      	Set objPresentation = objPPT.Presentations.Open	("E:\"&DatePart("d" , Now)&".ppt")
      ' задаем время на показ одного файла
      	objPresentation.Slides.Range.SlideShowTransition.AdvanceTime = 4
      	objPresentation.Slides.Range.SlideShowTransition.AdvanceOnTime = TRUE
      	
      	objPresentation.SlideShowSettings.AdvanceMode = ppAdvanceOnTime 
      	objPresentation.SlideShowSettings.ShowType = ppShowTypeKiosk
      	objPresentation.SlideShowSettings.StartingSlide = 1
      	objPresentation.SlideShowSettings.EndingSlide = objPresentation.Slides.Count
      ' задаем автоматический повтор при	достижении конца слайд шоу
      	objPresentation.SlideShowSettings.LoopUntilStopped = True
      	
      
      	Set objSlideShow = objPresentation.SlideShowSettings.Run.View
      ' продолжаем выполнение скрипта. не знаю зачем
      	Do Until objSlideShow.State = ppSlideShowDone
      
      loop