如何创建自定义 Outlook 项目?

发布于 2024-07-19 10:39:59 字数 704 浏览 5 评论 0原文

据我所知,Outlook 有设置项目,即邮件、任务、日历、便笺等。 如何创建 Outlook 将识别为其他项目的自定义项目? 我知道,当您添加 Business Contact Manager 时,它会创建“机会”等项目。

您可以覆盖项目,或继承项目并更改/添加属性和方法吗?

例子:

olAppointmentItem           1         Represents an AppointmentItem 
olContactItem               2         Represents a ContactItem 
olDistributionListItem      7         Represents an DistListItem 
olJournalItem               4         Represents a JournalItem 
olMailItem                  0         Represents a MailItem 
olNoteItem                  5         Represents a NoteItem 
olPostItem                  6         Represents a PostItem 
olTaskItem                  3         Represents a TaskItem 

I understand that Outlook has set items, i.e. Mail, Task, Calendar, Notes, etcetera. How can you create a custom Item that Outlook will recognize as the others? I know that when you add the Business Contact Manager it creates Items like "Opportunities"

Can you override an Item, or inherit an Item and alter/add properties and methods?

examples:

olAppointmentItem           1         Represents an AppointmentItem 
olContactItem               2         Represents a ContactItem 
olDistributionListItem      7         Represents an DistListItem 
olJournalItem               4         Represents a JournalItem 
olMailItem                  0         Represents a MailItem 
olNoteItem                  5         Represents a NoteItem 
olPostItem                  6         Represents a PostItem 
olTaskItem                  3         Represents a TaskItem 

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

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

发布评论

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

评论(3

可可 2024-07-26 10:39:59

你不能创建新的“类型”; 但是你
当然可以重新利用现有的
通过添加您自己的属性来类型。

该评论不正确。 您当然可以使用自定义表单,只需首先将它们发布到表单库,并使用户可以访问它们。 通常,它们基于默认项目类型之一的设计,并且还可以与作为默认项目类型的文件夹关联。

编辑:(根据评论请求更新帖子)

A.创建并发布自定义表单 - http://office.microsoft.com/en-au/outlook/HA012106101033.aspx

B. 以编程方式创建自定义表单的实例。

Outlook.Application olApp = new Outlook.Application();
    //mapifolder for earlier versions (such as ol 2003)
    Outlook.Folder contacts = olApp.Session.GetDefaultFolder(Outlook.olDefaultFolders.olFolderContacts);
    //must start with IPM.   & must be derived from a base item type, in this case contactItem.
    Outlook.ContactItem itm = (Outlook.ContactItem)contacts.Items.Add(@"IPM.Contact.CustomMessageClass");
    itm.Display(false);

You cannot create new "types"; but you
can certainly re-use the existing
types by adding your own properties.

That comment is not correct. you can certainly use custom forms, you just need to publish them first to a forms library, and make them accesible to users. generally they are based on the design of one of the default item types, and can also be associated with a folder as the default item type.

Edit: (updating post as per comment request)

A.Create and publish a custom form - http://office.microsoft.com/en-au/outlook/HA012106101033.aspx

B. programmatically create an instance of the custom form.

Outlook.Application olApp = new Outlook.Application();
    //mapifolder for earlier versions (such as ol 2003)
    Outlook.Folder contacts = olApp.Session.GetDefaultFolder(Outlook.olDefaultFolders.olFolderContacts);
    //must start with IPM.   & must be derived from a base item type, in this case contactItem.
    Outlook.ContactItem itm = (Outlook.ContactItem)contacts.Items.Add(@"IPM.Contact.CustomMessageClass");
    itm.Display(false);
浪推晚风 2024-07-26 10:39:59

Outlook 能够创建自定义表单。 你使用内置的表单设计器来outlook,有一个内置了所有版本的Outlook。 您可以使用“工具”|“工具”启动设计会话。 表格 | 设计一个表单命令。 或者,在 Outlook 2003 或更早版本中打开任何 Outlook 项目,然后选择“工具”|“ 表格 | 设计此表格。

当您设计表单时,您会根据现有表单(例如约会、任务等)开始。最接近空白表单的是帖子表单。

表单背后可以有 VBScript 代码来对用户操作做出反应 - 验证数据、与数据库同步、创建新的 Outlook 项目等。要添加代码,进入表单设计模式后,单击工具栏上的“查看代码”命令或丝带。

然后,您可以将表单发布到组织表单库中,以便每个人都可以访问它们。 它们也可以直接发布到文件夹中。 个人表单发布到文件夹或您的个人表单库。

Outlook 帮助中有很多此类内容的帮助文档,Google 也会返回大量向您展示如何操作的网站。

Outlook has the ability to create custom forms. You use the forms designer bultin to outlook, there is one built all versions of Outlook. You can launch a design session with the Tools | Forms | Design a Form command. Alternatively, open any Outlook item in Outlook 2003 or earlier and choose Tools | Forms | Design This Form.

When you design a form you start based on on of the exiting form such a appointment, task etc.. The closest thing to a blank form is the post form.

Forms can have VBScript code behind them to react to user actions -- validating data, synchronizing it with databases, creating new Outlook items, etc. To add code, once you're in form design mode, click the View Code command on the toolbar or ribbon.

You can then publish you form into the Organization Forms library, so that everyone has access to them. They can also be published directly to a folder. Personal forms are published either to a folder or to your Personal Forms library.

There is quite a lot of help documentation for this kind of thing in Outlook Help, also google will return loads of sites that show you how.

美人骨 2024-07-26 10:39:59

你不能创建新的“类型”; 但您当然可以通过添加自己的属性来重用现有类型。

You cannot create new "types"; but you can certainly re-use the existing types by adding your own properties.

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