使用互操作 API 配置 PowerPoint

发布于 2024-09-14 03:39:58 字数 375 浏览 1 评论 0 原文

我正在使用 powerpoint interop API 从 PowerPoint 的新实例(在本例中为 PowerPoint 2007)打开幻灯片。

在我的应用程序中,我需要避免鼠标更改幻灯片或显示右键单击菜单,因此我在 PowerPoint 中手动进行了配置。

我做了什么:

1.- 对于左键单击,我转到“动画”>“高级幻灯片”并取消选中“单击鼠标时”。

2.- 对于右键单击,我转到“PowerPoint 选项”>“高级”>“幻灯片放映”并取消选中“单击鼠标右键时显示​​菜单”。

我想知道如何使用 API 以编程方式执行步骤“1”和“2”,因为我希望我的应用程序能够在其他计算机上的相同条件下工作。

先感谢您。

I am using powerpoint interop API to open a slideshow from a new instance of PowerPoint (in this case, PowerPoint 2007).

In my app, I need to avoid the mouse changing the slide or showing up the right-click menu, so I manually configured that in PowerPoint.

What I did:

1.- For left click I went to "Animations">"Advance slide" and unchecked "On mouse click".

2.- For right click I went to "PowerPoint Options">"Advanced">"SlideShow" and unchecked "Show menu on right mouse click".

I would like to know how to do steps "1" and "2" programatically using the API, since I want my app to work in the same conditions in other computers.

Thank you in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

给我一枪 2024-09-21 03:39:58

对于第 1 点,您正在寻找 SlideShowTransistion 界面,特别是 AdvanceOnClick 属性。看来您需要为演示文稿中的每张幻灯片进行设置:

pptSlide.SlideShowTransition.AdvanceOnClick = Microsoft.Office.Core.MsoTriState.msoFalse;

对于第二张幻灯片,我找不到通过互操作 API 公开的任何地方。我能找到禁用它的唯一方法是修改注册表项(这将是每个用户安装)。

在我的 Powerpoint 2003 安装中,它由 reg 键控制

HKEY_USERS\Unique-ID-For-User\Software\Microsoft\Office\11.0\PowerPoint\Options\SSRightMouse

For number 1, you are looking for the SlideShowTransistion interface and in particular the AdvanceOnClick property. It looks like you need to set it for each slide in the presentation:

pptSlide.SlideShowTransition.AdvanceOnClick = Microsoft.Office.Core.MsoTriState.msoFalse;

For number 2, I can't find anywhere this is exposed through the interop API. The only method I can find to disable it is to modify the registry key (this would be per user install).

On my Powerpoint 2003 install it is controlled by the

HKEY_USERS\Unique-ID-For-User\Software\Microsoft\Office\11.0\PowerPoint\Options\SSRightMouse

reg key.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文