带 WPF 的 C# Outlook 插件

发布于 2024-10-10 01:33:26 字数 438 浏览 0 评论 0原文

我看过几个关于编写一般 Outlook 加载项的教程,并获得了一些简单的示例:菜单中的项目、上下文菜单、功能区等。

许多 Microsoft 文档让我很困惑,或者是用 VB 编写的,所以我我们正在努力实现的目标遇到了一些问题。

  1. 有没有办法在新电子邮件的主题行下方添加自定义控件?我们需要提供一个下拉菜单并在发送的电子邮件中添加一个附加标头以进行电子邮件跟踪。现在我得到的最好的方法是在功能区的“加载项”选项卡中添加一个CommandBarButton,有更好的方法吗?
  2. 我们在安装多个版本的 Outlook 时会遇到任何问题吗? (只有 2007 及更高版本才能工作吗?)
  3. 您可以直接在功能区等中托管 WPF 控件吗?我知道 WPF 弹出窗口在从 CommandBarButton 中显示时工作得很好。
  4. 对于我们正在尝试做的事情,是否有一些好的链接?

I have looked at several tutorials on writing general Outlook add-ins, and have gotten simple examples to work: items in menu, context menu, ribbons, etc.

Many of Microsoft's documentation has send me in circles, or is in VB, so I have run into some questions with what we are trying to accomplish.

  1. Is there a way to add a custom control below the Subject line in a new email? We need to supply a drop-down and add an additional header to emails sent for email tracking. Right now the best I have gotten is adding a CommandBarButton in the "Add-ins" tab of the Ribbon, is there a better method?
  2. Will we run into any issues installing for multiple versions of outlook? (Will only 2007 and higher work?)
  3. Can you host WPF controls directly in a Ribbon, etc.? I know that WPF popup windows work just fine when shown from a CommandBarButton.
  4. Are there some good links out there for what we're trying to do?

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

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

发布评论

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

评论(2

苏璃陌 2024-10-17 01:33:26

2:多版本支持是一个PITA。两面下注的方法是在运行您想要支持的 Outlook 版本的 PC 上进行开发;因此,每个受支持的版本可能有多个安装包。虽然每个人都试图解决这个问题,但我已经成功地使用了这种方法:

加载项中的版本特定 UI - Andrew Whitechapel - 网站主页 - MSDN 博客:
http:// /blogs.msdn.com/b/andreww/archive/2008/09/02/version-specific-ui-in-add-ins.aspx

4:基本资源:

  • Visual Studio Tools for Office for Office 和 Outlook 上的开发人员论坛
  • MSDN OutlookCode.com

(仅供参考,我在 Add-in Express 工作)

2: Multi-version support is a PITA. The hedge-your-bets approach is to develop on a PC running the version of Outlook you want to support; thus you may have multiple setup packages for each supported version. Everybody tries to get around this though, but I've used this approach with success:

Version-Specific UI in Add-ins - Andrew Whitechapel - Site Home - MSDN Blogs:
http://blogs.msdn.com/b/andreww/archive/2008/09/02/version-specific-ui-in-add-ins.aspx

4: Essential resources:

  • Visual Studio Tools for Office For Office and Outlook for Developers Forums on MSDN
  • OutlookCode.com

(FYI, I work for Add-in Express)

你好,陌生人 2024-10-17 01:33:26
  1. 不,如果不实现整个消息窗口就不行。
  2. 我们必须为 2007 年和 2010 年制作 2 个项目,我们将跳过 2003 年和 b/c 以下的项目,这要困难得多,而且很少使用。
  3. 无法在功能区中托管 WPF,我们将通过按下功能区按钮来显示 WPF 弹出窗口。
  4. 我发现最好的办法就是按照 Visual Studio 中的项目模板进行操作。

总的来说,我们的加载项将执行以下操作:

  • 为 2010 年和 2007 年创建 2 个共享“共享”程序集的项目
  • 所有可重用的工作都在共享程序集中完成
  • WPF 仅通过弹出窗口显示(您可以执行自定义任务窗格,但这对我们的加载项没有意义)
  1. No, not without implementing the entire message window.
  2. We have to make 2 projects for 2007 and 2010, we are skipping 2003 and below b/c it is much more difficult and would be rarely used.
  3. Can't host WPF in a Ribbon, we're going to display a WPF popup from a Ribbon button press.
  4. Best thing I've found is to just follow the project template in Visual Studio and mess around.

Overall, our add-in is going to do the following:

  • Make 2 projects for 2010 and 2007 that share a "Shared" assembly
  • All reusable work is done in the shared assembly
  • WPF is only displayed via popup windows (you can do a custom task pane, but it doesn't make sense for our add-in)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文