使用自定义消息类创建Outlook项目IPM.CustomClass

使用自定义消息类创建Outlook项目IPM.CustomClass

问题描述:

我正在为Outlook2003插件使用VSTO 3.0。是否可以使用自定义消息类IPM.CustomClass创建项目。使用自定义消息类创建Outlook项目IPM.CustomClass

以下article提到了关于窗体配置文件来创建自定义项目IPM.Help。 是否有可能通过创建自定义Outlook表单并将其注册到自定义消息类别

顺便说一句,可以在Exchange Server 2003中使用webdav创建一个具有自定义消息类IPM.CustomClass的项目。

是的,你可以创建一个自定义类的新项目使用Items.Add方法并指定消息类。

http://msdn.microsoft.com/en-us/library/bb220348.aspx

不过是你的问题?看起来你可能想要以编程方式创建一个新类?

+0

自定义消息类不应该被扩展现有的项目如IPM.Contact或IPM.Task ..它应该是IPM.CustomMessage – 2009-08-05 06:06:54

是的,你可以在Exchange中创建消息类。你使用organisational形式库。 我相信你可以用webdav做到这一点,如果你需要的话,基本上你仍然在Outlook中设计表单并保存它。然后使用webdav将表单模板推送到交换的组织库。 http://www.outlookcode.com/article.aspx?ID=35

是的,你可以创建一个自定义消息类。正如前面的海报所说,你只需在outlook中创建一个表单(在设计模式下),然后使用Publish命令将表单发布到Outlook表单库(或组织表单库 - 交换)。

http://office.microsoft.com/en-au/outlook/HA012106101033.aspx

在VSTO的条款,您不使用此直接注册类,这是你当你从窗体设计器使用发布命令来完成。 VSTO仅用于编写使用自定义消息类创建“检查器”窗口的代码。

http://support.microsoft.com/kb/310244

见下面的代码示例..

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);