【发布时间】:2013-05-04 08:16:25
【问题描述】:
我编写了一个 Outlook 插件,它基本上允许通过 Outlook 接收的电子邮件与网站链接,这样电子邮件也可以在网站的通信功能中查看。我在 MailItem 的 ItemProperties 中存储了其他详细信息,这些详细信息基本上就是网站中与电子邮件相关的用户 ID。
我遇到的问题是在打印电子邮件时,我添加到 MailItem 的任何 ItemProperties 都在打印。有谁知道在打印电子邮件时如何排除自定义 ItemProperties?
这是创建自定义 ItemProperty 的代码:
// Try and access the required property.
Microsoft.Office.Interop.Outlook.ItemProperty property = mailItem.ItemProperties[name];
// Required property doesnt exist so we'll create it on the fly.
if (property == null) property = mailItem.ItemProperties.Add(name, Microsoft.Office.Interop.Outlook.OlUserPropertyType.olText);
// Set the value.
property.Value = value;
【问题讨论】:
标签: printing outlook interop mailitem