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

标签 c# .net interop powerpoint

我希望能够通过按 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();

但是,我还没有找到任何可以推进幻灯片的方法。有什么想法吗?

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

最佳答案

以编程方式推进的方法是“SlideShowWindow.View.Next”。您还可以使用“SlideShowWindow.View.Previous”向后移动。

关于C# - 以编程方式推进 Powerpoint 幻灯片放映的方式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1463358/

相关文章:

c# - 如何提高调用 Web 服务的 Excel UDF 的性能?

c# - TCP Socket.Connect 正在生成误报

c# - 在 .NET 中通过格式字符串发出冒号

c# - 写入 Excel 文件时文件名或路径不存在或被其他程序使用

c# - 从 IIS 7 asp.net c# 获取 .ini 文件

c# - 无法使用 C# webdriver 单击属于 IFrame 的按钮

c# - 如何使用 https 创建 HttpListener

swift - 从 Swift 创建 Unmanaged<CFString>

asp.net - 什么是互操作 dll?

c# - 在检索 key 之前验证资源是否存在