c# - PowerPoint SlideShowSettings.Run() does not run embedded video -


I have a C # application that runs on a computer connected to a large display in our cafeteria. The application pulls all the powerpoint files out of one folder and each one continuously plays as a slideshow, everything was working fine unless someone decided to put a movie clip on the slide. The problem is that the film never starts. If PowerPoint opens the presentation and works in running the show, and if I right click on the presentation and click on 'show' it works here to open the presentation here and start the slideshow I am using

  pres = app.Presentations.Open (pptPath, MsoTriState.MsoTrue, MsoTriState.MsoTrue, MMsoTriState.msoFals); Pres.SlideShowSettings.Run ();  

Does anything else require me to set the run () method to start movies?

Edit: There was only one slide in the presentation in the question that contained the movie. If I added another slide to it, then it worked fine. Apart from adding a slide before and there was a single problem, apparently the problem exists only for the last slide in the presentation. The main issue here is that PowerPoint Animation (Video, Audio, Custom Speed ​​Path etc) only then

slideshow window is focused, this means that when you run your app and launch a PPT, your app still maintains the focus and hence the animation is not turned on (though it Prevents you from manually interrupting your running deck manually).

There are several ways around it:

  1. You can use the API SetWindow to bring your slideshow window Can call There is no good way to do this in my opinion.
  2. The easiest way is to save .ppt / .pptx to .pps / .ppsx (PowerPoint Show) only. With it, you can use your code to run it and it will automatically focus and focus (and your animations [video, et al] will run as your intent).

Comments