C# - 以编程方式推进Powerpoint幻灯片放映的方式?

Dav*_*son 14 .net c# powerpoint interop

我希望能够通过按Windows窗体中的按钮来推进Powerpoint演示.以下是我从http://bytes.com/topic/c-sharp/answers/272940-open-powerpoint-presentation-c-window-form中找到的一些代码,它打开了一个Powerpoint演示幻灯片:

Microsoft.Office.Interop.PowerPoint.Application oPPT;
Microsoft.Office.Interop.PowerPoint.Presentations objPresSet;
Microsoft.Office.Interop.PowerPoint.Presentation objPres;

//the location of your powerpoint presentation
string strPres = @"filepath";

//Create an instance of PowerPoint.
oPPT = new Microsoft.Office.Interop.PowerPoint.ApplicationClass();

// Show PowerPoint to the user.
oPPT.Visible = Microsoft.Office.Core.MsoTriState.msoTrue;

objPresSet = oPPT.Presentations;

//open the presentation
objPres = objPresSet.Open(strPres, MsoTriState.msoFalse,
MsoTriState.msoTrue, MsoTriState.msoTrue);

objPres.SlideShowSettings.Run();
Run Code Online (Sandbox Code Playgroud)

但是,我没有找到可以通过幻灯片前进的任何方法.有任何想法吗?

(我真正想做的是使用WiiRemote推进幻灯片,为学生项目).

Tod*_*ain 10

以编程方式推进的方法是"SlideShowWindow.View.Next".您也可以使用"SlideShowWindow.View.Previous"向后退.