如何创建一个自定义的Outlook项目? [英] How do I create a custom Outlook Item?
问题描述
据我了解,Outlook已设定的项目,即邮件,任务,日历,便笺,等等。你怎么可以创建自定义项的Outlook将识别为其他人呢?我知道,当你添加的商务联系人管理器它创建类似机遇的相关文件
您可以覆盖项目,或继承一个项目,改变/添加属性和方法呢?
例子:
olAppointmentItem 1表示一个AppointmentItem
olContactItem 2表示一个ContactItem
olDistributionListItem 7代表DistListItem
olJournalItem 4表示JournalItem
olMailItem 0表示一个的MailItem
olNoteItem 5代表NoteItem
olPostItem 6代表PostItem
olTaskItem 3表示TaskItem
您不能创建新的类型;但你
当然可以通过增加自己的属性重新使用现有的
类型。
块引用>
这批语不正确。你当然可以使用自定义表单,您只需要先发布他们窗体库,使他们入店给用户。 。一般它们是基于默认项类型中的一个的设计,并且也可以用一个文件夹作为默认项目类型相关联
编辑:(更新后的每个评论的请求)
A.Create并发布自定义表单 - http://office.microsoft.com/en-au/outlook/HA012106101033.aspx
乙。 。编程创建自定义窗体的实例
Outlook.Application olApp =新Outlook.Application();
//早期版本(如醇2003)
Outlook.Folder接触= olApp.Session.GetDefaultFolder(Outlook.olDefaultFolders.olFolderContacts)mapifolder;
//必须用IPM启动。 &安培;必须从基项目类型派生,在这种情况下contactItem。
Outlook.ContactItem ITM =(Outlook.ContactItem)contacts.Items.Add(@IPM.Contact.CustomMessageClass);
itm.Display(假);
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
解决方案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);
这篇关于如何创建一个自定义的Outlook项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!