![](/img/trans.png)
[英]storage of custom properties in a exchange public folder - Outlook
[英]Access custom view column from exchange public folder
我正在使用Exchange Web服务访问公用文件夹中的联系人记录。 我需要提取为该文件夹中的视图创建的自定义列“客户联系人管理”。 自定义列是在用户界面中创建的。
之前,我已经在自己通过代码创建的属性上使用过ExtendedPropertyDefinition
类。 那是我在这种情况下应该使用的,如果是的话,那么我如何获得自定义列的GUID?
我终于在Microsoft Exchange Server论坛上从David Sterling找到了关于该线程的答案。 他的示例(在下面复制)显示了如何直接使用EWS和托管api来执行操作。
// via autogenerated proxy classes
PathToExtendedFieldType hairColorPath = new PathToExtendedFieldType();
hairColorPath.DistinguishedPropertySetId = DistinguishedPropertySetType.PublicStrings;
hairColorPath.DistinguishedPropertySetIdSpecified = true;
hairColorPath.PropertyName = "HairColor";
hairColorPath.PropertyType = MapiPropertyTypeType.String;
// via the Client API
ExtendedPropertyDefinition hairColor = new ExtendedPropertyDefinition(
DefaultExtendedPropertySet.PublicStrings,
"HairColor",
MapiPropertyType.String);
这是我针对自己的问题使用托管api所做的事情。 关键是使用DefaultExtendedPropertySet.PublicStrings
,这是Outlook存储自定义视图列的位置。
ExtendedPropertyDefinition _clientContactManagementPropertyDefinition =
new ExtendedPropertyDefinition(
DefaultExtendedPropertySet.PublicStrings,
"Client Contact Management",
MapiPropertyType.Boolean
);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.