tags:

views:

146

answers:

1

When a slideshow running in PowerPoint I want to control the movement (Next and Previous) of the slides. Of course it is possible with the > and < button on the keyboard, but is there any way in which I can have a custom application listening to the Next and Previous controls?

My custom application has nothing but 2 buttons, next and previous, when I click either, the button's event handler should pass the control to the PowerPoint application running the slideshow. And thus, PowerPoint will move the slideshow back or forward?

Somewhat similar to the way remote, wireless PowerPoint Presenters work on the s/w end.

+4  A: 

Yeah, totally doable. The event you want is SlideShowNextSlide - you can read more about it here. For C# and PowerPoint-specific, this is a great article: How to handle PowerPoint events with Visual C# .NET.

Also, this search on SO turns up some good reading and things to watch out for. Finally, I don't know if C# has one, but there is a "Remotely Controlling PowerPoint" sample in both VS2008/VS2010 for VB.NET that is probably easy enough to port to C# - here's the info page on it.

Otaku
Ok, that's great. But the functions mentioned are for going to Next Slide. I want to go to previous slide as well. Possible?
James
@Jayesh: yes, this event tracks both Next|Forward and Next|Back - if you change the slide at all to another slide, it will sink that event. To actually programmatically change it yourself, you'll use `SlideShowWindow.View.Next` and `SlideShowWindow.View.Previous`.
Otaku
Ok, Thanks a lot! It works!
James