MS Outlook - 自动扩展表单

发布于 2024-07-25 23:06:18 字数 507 浏览 11 评论 0原文

我需要开发能够使用从远程服务器下载的选项卡扩展现有表单的 Outlook 扩展。 例如,在约会表单中应该出现附加选项卡。 此选项卡中的表单定义是从 Web 服务下载并使用 WPF 等方式呈现的。 此选项卡的数据也来自服务器,并绑定到表单字段。 最后一件事 - 保存表单时,还应该将其提交到此远程服务器。

它应该可以在 Outlook 2003 和 2007 中工作。

主要问题是:

  1. 这可能吗?
  2. 读什么才能更快地掌握它? MSDN 很大,甚至包括 Outlook 开发人员部分。
  3. 有样品吗?

更新

非常感谢您的回答! 当然,有太多不同的问题,所以我必须将其分成几个部分。 阅读完回复并做完作业后,我想继续:

  1. 是的,这是可能的。 不过也许我稍后会发现一些水下岩石。
  2. 最好的方法是使用 VS 2008 并尝试进行扩展。

I need to develop the Outlook Extension capable of extending existing forms with tabs, downloaded from remote server. For example, in the appointment form additional tab should appear. Form definition in this tab is downloaded from a web service and rendered using, say, WPF. Data for this tab is also coming from server, and is bind to the form fields. Final thing - when form is saved, it should be also submitted to this remote server.

It should work in Outlook 2003 and 2007.

Main questions are:

  1. Is it at all possible?
  2. What to read to grasp it faster? MSDN is big, even its Outlook developer section.
  3. Are there any samples?

UPDATE

Many thanks for answers! Definitely, there are too many different questions, so I'll have to break it down into several parts. After reading responses and making my homework I want to resume:

  1. Yes, it's possible. Maybe I'll found some underwater rocks later, though.
  2. Best way is to take VS 2008 and try to make extension.

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

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

发布评论

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

评论(2

残月升风 2024-08-01 23:06:18

好吧,你的帖子中有很多问题,我想我有一些答案,但不是全部。 不管怎样,你的问题涉及的内容太多,一篇文章无法涵盖所有​​内容。

首先要知道的是,Outlook 2007 的操作方式与以前的版本不同。 因此,您可能需要执行两次操作才能同时使用 Outlook 2003 和 2007。

首先要了解有助于搜索所需内容的词汇。 在 Outlook 2003 中,您将使用自定义表单来创建或扩展表单。 在 Outlook 2007 中,您将使用新的表单区域。 尽管它们在概念上相似,但它们是两个不同的东西。

由于我只使用过 Outlook 2007,因此我接下来所说的内容仅适用于 Outlook 2007。
您需要有 Visual Studio 2005 并下载 VSTO(Visual Studio Tools for Office)或 Visual Studio 2008。

窗体区域有 4 种类型之一:相邻、分离、替换或全部替换。 相邻意味着它显示在默认表单的底部。 单独意味着它是表单内的一个新“页面”。 Replace 表示替换默认表单的第一页,Replace all 表示替换默认表单的所有页面。

你说你想使用标签。 在 Outlook 2007 中,您不应该这样做。 您应该使用单独的页面,以尊重 Outlook 2007 中的 UI 原则。您可以创建选项卡,但您会发现它们看起来相当难看。 另一方面,功能区中会显示单独的页面,使您可以轻松地从一个页面切换到另一个页面。

您有两种设计表单区域的方法。 第一种推荐方法是 Outlook 2007 内部的设计器:类似于“工具 > 表单 > 创建区域表单”。 您可以在这个东西中进行设计,将表单保存为 .ofs 文件,然后将其导入到 Visual Studio 中。

优点:

  • 微软推荐,所以几乎所有关于自定义Outlook 2007的资源都使用这种方法。
  • Outlook 的现成控件(例如用于保存邮件地址的字段)。
  • 自动绑定到邮件中的 UserProperty。

缺点:

  • 设计粗糙(很难让事情正确对齐)。
  • 每当您想要更新表单时,您都必须在 Outlook 中对其进行修改,然后在 Visual Studio 中再次上传,这将删除您以前的代码。
  • 旧的 COM 控件很难使用。

另一种方法是在 Visual Studio 中设计一个新的区域窗体。

优点:

  • 你拥有你想要的所有最新的、强大的winforms控件。
  • 更好的设计师。
  • 易于更新。

缺点:

  • 您不会找到太多有关它的信息,因为大多数书籍作者只使用 Outlook 设计器。
  • 您必须自己编写许多在 Outlook 中视为理所当然的行为(例如,创建一个可以保存和检查多个邮件地址的文本框),这是非常痛苦的,而且可能很难做到。

我认为您可以通过邮件发送自定义表单(至少是在 Outlook 中设计的表单),但我不确定,因为我自己从未尝试过。

至于绑定,您可能可以使用事件来完成此操作。 例如,在保存或发送消息之前会触发一些事件。

这就是现在的全部内容,我希望我的长答案不会偏离主题,并且它可以帮助您准确地确定您想要做什么。 您应该了解 Outlook 允许您执行哪些操作,然后针对每一点提出更具体的问题。

Ok there are many questions inside your post, I think I have some of the answers, but not all. Anyway, there is too much things in your question for a single post to cover it all.

First thing to know is that Outlook 2007 has a different way to do things than the previous versions. So you will probably have to do things twice in order to use both Outlook 2003 and 2007.

First thing to know is the vocabulary that will help to search what you need. In Outlook 2003, you will use Custom Forms to create or extend forms. In Outlook 2007, you will use the new Form Regions. Although they are similar in concept, they are 2 different things.

Since I've worked only in Outlook 2007, what I say next only apply to that.
You will need to have either Visual Studio 2005 and download VSTO (Visual Studio Tools for Office), or Visual Studio 2008.

A form region has one of 4 types : Adjacent, Separate, Replace or Replace-All. Adjacent means its displayed at the bottom of the default form. Separate means it is a new "page" inside the form. Replace means it replaces the first page of the default form, and Replace all means it replaces all the page of the default form.

You said you wanna use Tabs. In Outlook 2007, you shouldn't. You should use separate pages, to respect the UI principles in Outlook 2007. You may create Tabs, but you will see they will appear quite ugly. On the other hand, Separate pages appear in the Ribbon, which allows you to switch easily from one page to another.

You have two ways to design Form Regions. The first, recommended way, is the designer inside Outlook 2007 : something like "Tools > Forms > Create a Region Form". You design inside this thing, save the form as a .ofs file and then import it into Visual Studio.

Advantages :

  • Recommended by Microsoft, so almost all the resources about customising Outlook 2007 uses this method.
  • Ready-made controls for Outlook (for example fields designed to hold mail addresses).
  • Automatic bind to UserProperty in your mail.

Drawbacks :

  • Crude designer (it's hard to get things aligned properly).
  • Whenever you want to update your form, you will have to modify it in Outlook, and upload it again in Visual Studio, which will erase your previous code.
  • Old COM controls which are awful to work with.

The other way, is to design a new Region Form in Visual Studio.

Advantages :

  • You have all the latest, powerfuls, winforms control you want.
  • Better designer.
  • Easy to update.

Drawbacks :

  • You won't find much information about it, since most book authors only use the Outlook designer.
  • You will have to code by yourself many behaviors you take for granted in Outlook (such as, creating a textbox which can hold and check multiple mail addresses) which is quite painful and may be hard to do.

I think you can send your custom forms (at least those designed in Outlook) with a mail, but I'm not sure since I've never tried it myself.

As for the binding, you will probably be able to do this with event. For example, there are events that are triggered before saving or sending a message.

That's all for now, I hope i'm not off-topic with my long answer, and that it can help you determine exactly what you want to do. You should get some idea of what Outlook allows you to do and then ask more specific questions on each point.

花间憩 2024-08-01 23:06:18

正如您所描述的那样,这是不可能的,但您可以采取一些方法。 Ksempac 还指出了很多关于如何在 Outlook 2007 中进行操作的优点和缺点的好东西。

要在 2003 年和 2007 年启动并运行它,我认为最好的方法是设计自己的约会表单。 您可以扩展其中一个选项卡,以拥有一个浏览器控件来显示来自 Web 服务的动态表单。 其结果可以提交回或与新的 Outlook 表单一起保存,以便稍后渲染/处理。

示例:

表单设计示例:
http://www.msexchange.org/articles/Designing-Outlook- Forms-Part1.html

覆盖默认表单:
http://support.microsoft.com/?kbid=241235

有大量这里和网上有关于设计 Outlook 表单的好东西,您可以通过各种方式在这里询问。 还有一些关于表单的好书:

Sue Mosher 的书籍和网站是一个很好的起点。 Outlookcode.com

Microsoft Outlook 编程:管理员、开发人员和高级用户的快速入门
(ISBN 1-555-58286-9,数字出版社)

Microsoft Outlook 2007 编程:高级用户和管理员的快速入门
(ISBN 1-55558-346-6,数字出版社)

作为 Ksempac,您可能需要分解问题并边走边问..

更新
如果您有一些预算 Add-in Express http://www.add-in-express.com/ 将消除部署到 2 个版本 Outlook 的痛苦,并且您可能比手动执行更快地提高工作效率。

This is not possible as you describe but you can get some of the way there. Also Ksempac has pointed out alot of good stuff on the pros and cons on how to do things in outlook 2007.

To get this up and running in 2003 and 2007 I think that the best way to go would be to design your own appointment form. You can extend one of the tabs to have a browser control that displayed the dynamic form from your Web service. The results of which could be submitted back or saved with the new outlook form for rendering/processing later.

examples :

Form Design Example:
http://www.msexchange.org/articles/Designing-Outlook-Forms-Part1.html

Overwrite a default forms:
http://support.microsoft.com/?kbid=241235

There is a load of good stuff on the here and the net about designing outlook forms and you can all ways ask on here. There are a couple of good books as well on forms:

Sue Mosher's books and site are a good place to start. Outlookcode.com

Microsoft Outlook Programming: Jumpstart for Administrators, Developers, and Power Users
(ISBN 1-555-58286-9, Digital Press)

Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators
(ISBN 1-55558-346-6, Digital Press)

As Ksempac you probally need to break you question down and ask as you go ..

update
If you have some budget Add-in Express http://www.add-in-express.com/ will take the pain out of deploying to the 2 versions outlook and you may get you productive quicker than if you do it by hand.

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