VSTO 和 Outlook 2003 上下文菜单

发布于 2024-07-22 04:31:44 字数 188 浏览 3 评论 0原文

我想使用 VSTO 将 Outlook 2003/2007 与我的应用程序集成。 使用 Outlook 2007 没问题 - 我拥有所需的所有挂钩,但使用 Outlook 2003 我找不到如何将上下文菜单项添加到收件箱中的邮件项目。 我没有找到任何像 2007 版本中那样用于填充上下文菜单的事件处理程序。

你知道有什么解决方法吗?

I want to have outlook 2003/2007 integration with my application using VSTO. With outlook 2007 it's OK - I have all the hooks I need but with outlook 2003 I can't find how to add context menu item to the mail items in the inbox. I didn't find any event handler for populating the context menu like the one in the 2007 version.

Do you know any workaround?

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

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

发布评论

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

评论(1

暖风昔人 2024-07-29 04:31:44

站点仍然可以在存档中查看:http://web.archive.org/web/20160405050041/http://www.developerzen.com/2005/04/04/adding-a-button -to-outlooks-context-menu/

要将按钮添加到 Outlook 资源管理器上下文菜单,您需要获取“上下文菜单”CommandBar。
仅当用户在资源管理器中右键单击时才会创建此命令栏实例,以便了解何时创建这样的命令栏实例
创建后,您必须侦听资源管理器的 CommandBars 集合的 OnUpdate 事件。
在 OnUpdate 事件处理程序中,您可以检查上下文菜单 CommandBar 是否存在:

CommandBar bar = ActiveExplorer.CommandBars[“Context Menu”];

获取上下文菜单 CommandBar 后,您需要更改其 Protection 属性以允许自定义,添加按钮,然后将 Protection 改回来。

Site is still viewable in the archive: http://web.archive.org/web/20160405050041/http://www.developerzen.com/2005/04/04/adding-a-button-to-outlooks-context-menu/

To add a button to the Outlook explorer context menu you need to get the “Context Menu” CommandBar.
This command bar instance is only created when the user right clicks in the explorer so in order to know when such a bar is
created you have to listen to the OnUpdate event of the Explorer’s CommandBars collection.
Inside the OnUpdate event handler you can check if the context menu CommandBar exist:

CommandBar bar = ActiveExplorer.CommandBars[“Context Menu”];

After getting the context menu CommandBar you need to change it’s Protection property to allow customization, add your button, and change the Protection back.

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