【问题标题】:Open a Powerpoint file in Presenter mode在演示者模式下打开一个 Powerpoint 文件
【发布时间】:2014-09-08 03:31:05
【问题描述】:

我可以直接用幻灯片模式打开一个 Powperpoint 文件:

System.Diagnostics.Process pptProcess = new System.Diagnostics.Process();
pptProcess.StartInfo.FileName = Environment.CurrentDirectory + @"\MyPres.pptx";
pptProcess.StartInfo.UseShellExecute = true;
pptProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized;
pptProcess.StartInfo.Verb = "show"; // to open the slideshow
pptProcess.Start();

现在 Powerpoint 允许我们同时查看笔记和幻灯片,这是演示者模式。 所以,我想直接在这种模式下打开一个演示文稿。 我尝试过不同的“动词”(StartInfo.Verb),不同的参数(StartInfo.Arguments),但我没有解决方案。

你有解决办法吗?

感谢您的帮助。

【问题讨论】:

  • 感谢这对我有帮助

标签: c# .net powerpoint


【解决方案1】:

PowerPoint 在注册表中存储一个标志,以指示它是否应在演示者视图中显示演示文稿。例如,对于 PowerPoint 2010,它位于:

HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\PowerPoint\Options

该值是一个名为 UseMonMgr 的 DWORD

您可以在启动 PowerPoint 之前将其设置为 1。在 PowerPoint 启动后更改注册表将无效。

或者一旦PPT打开,你可以将演示对象的SlideShowSettings.ShowPresenterView设置为true。

【讨论】:

  • 感谢您的回答,但我已经修改了注册表,您的解决方案使用了 Powerpoint Interop。我们不能使用它。我们必须通过新进程打开 Powepoint。
  • 我不确定你的意思。我只建议修改注册表,与 PowerPoint Interop 无关。
  • SlideShowSettings.ShowPresenterView 是互操作的属性see here 我必须使用 System.Diagnostics.Process 来启动 Powerpoint 的进程,我无法访问属性 SlideShowSettings.ShowPresenterView。
  • 然后重新阅读我的答案。忽略最后一行,阅读其余部分。
猜你喜欢
  • 2013-12-14
  • 2023-03-29
  • 1970-01-01
  • 2017-04-22
  • 2020-11-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-02-24
相关资源
最近更新 更多