【发布时间】:2014-03-15 11:33:34
【问题描述】:
我需要读取和写入我在 Outlook 中的进程邮箱(公共邮箱?)中创建的自定义列。
我想我应该以某种方式使用 ExtendedPropertyDefinition,但是,我不知道如何。如果有意义,我没有该列的 GUID。
我已将自定义列命名为“工程师”,并使用了此代码,但我的 ext 道具计数为 0。
ExtendedPropertyDefinition myExtDef=
new ExtendedPropertyDefinition(DefaultExtendedPropertySet.PublicStrings,
"Engineer",
MapiPropertyType.String);
然后
PropertySet propertySet =
new PropertySet(BasePropertySet.FirstClassProperties, myExtDef);
终于
foreach (Item item in findResults)
{
EmailMessage message =
EmailMessage.Bind(service, item.Id, new PropertySet(propertySet));
}
当我在 findResults 中调试和检查“项目”时,我看到了主题属性和所有内容,但 ExtendedProperties 计数为 0。看起来我定义扩展属性的方式有问题。
谁能帮助我如何读写自定义列?
编辑: 我现在不太确定是否可以使用托管 API 来实现这一点。如果有人有一些想法,我会接受。我检查了以下所有内容,但无济于事。
Accessing custom contacts using EWS managed API http://msdn.microsoft.com/en-us/library/office/dd633697(v=exchg.80).aspx
还有其他...
【问题讨论】:
标签: c# .net exchangewebservices ews-managed-api extended-properties