Reputation: 29
I am able to add MP4 video on PowerPoint slide , and I want to play programmatically and once it finished playing its need to move next slide automatically and another video start in next slide .
var shape = objSlides.Shapes.AddMediaObject2(@"C:\\Users\\Rajan\\Downloads\\sample-5s.mp4", MsoTriState.msoTrue, MsoTriState.msoFalse, 10, 10);
Anyone please help me to suggest any property name which provide running or stop status of mp4 on current slide .
Upvotes: 1
Views: 78
Reputation: 49455
The PowerPoint object model does not provide any COM methods to play and stop an embedded video. You can try using Windows API functions or Microsoft Active Accessibility to simulate clicks to start the video, but that is not a trivial task.
For example, in VBA you could use the SendKeys
method:
Sub Test()
Application.ActivePresentation.Slides(1).Shapes(1).Select
SendKeys "%p", True
End Sub
Upvotes: 0