Trong PropertySet mặt hàng của bạn, bạn cần phải thiết lập các RequestedBodyType để BodyType.Text. Dưới đây là một ví dụ:
PropertySet itempropertyset = new PropertySet(BasePropertySet.FirstClassProperties);
itempropertyset.RequestedBodyType = BodyType.Text;
ItemView itemview = new ItemView(1000);
itemview.PropertySet = itempropertyset;
FindItemsResults<Item> findResults = service.FindItems(WellKnownFolderName.Inbox, "subject:TODO", itemview);
Item item = findResults.FirstOrDefault();
item.Load(itempropertyset);
Console.WriteLine(item.Body);
Nguồn
2012-06-28 14:07:29
Cảm ơn, nó hoạt động. – JNM
Lưu ý rằng PropertySet phải được sử dụng cho cả service.FindItems() và item.Load() để làm việc này đúng cách. – Dave
Tôi nhận ngoại lệ này khi thực hiện Microsoft.Exchange.WebServices.Data.ServiceObjectPropertyException: Bạn phải tải hoặc gán thuộc tính này trước khi bạn có thể đọc giá trị – kolexinfos