【发布时间】:2014-05-04 11:34:21
【问题描述】:
有没有办法从 ItemAttachment 的 Item 中删除 HTML 标签?
我只能从 Item 中获取文本。但不是来自 ItemAttachment 的 Item。
这是我的代码:
foreach (ItemAttachment itemAttach in item.Attachments.OfType<ItemAttachment>())
{
Console.WriteLine(itemAttach.Name);
itemAttach.Load();
PropertySet propSet = new PropertySet();
propSet.RequestedBodyType = BodyType.Text;
propSet.BasePropertySet = BasePropertySet.FirstClassProperties;
itemAttach.Item.Load(propSet);
Console.WriteLine(itemAttach.Item.Body.Text);
}
它会得到这个异常
This operation isn't supported on attachments
我尝试使用项目 ID 绑定到交换服务。
这也给了我一些例外! 请给我一些建议,我该怎么做。
【问题讨论】:
标签: c# properties attachment ews-managed-api