1
我已經通過保存成功的Outlook應用程序中的JavaScript在Outlook中的約會中創建了自定義屬性。我已檢查此約會的MAPI屬性,我可以將該屬性看作JSON字典。通過EWS訪問公共字符串MAPI屬性
存儲的屬性的MFCMAPI顯示:
我現在試圖通過EWS在C#應用程序來獲取這一點。爲了排除故障,我也試圖找回另一個屬性,以33336.
ExtendedPropertyDefinition epd = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.PublicStrings, "cecp-propertyNames", MapiPropertyType.String);
ExtendedPropertyDefinition epd2 = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Appointment, 33336, MapiPropertyType.String);
//Create our sync window. This is the period of appointments it will capture and sync
CalendarView cv = new CalendarView(START_DATE_SYNC, END_DATE_SYNC);
cv.PropertySet = new PropertySet(BasePropertySet.FirstClassProperties, epd, epd2);
FolderId calendarFolderId = new FolderId(WellKnownFolderName.Calendar, room.Address);
FindItemsResults<Appointment> fappts = service.FindAppointments(calendarFolderId, cv);
交易所的ID返回合適的約會項目,但訪問擴展屬性,只與33336的ID屬性時(測試一個)返回。任何時候我嘗試和檢索PS_PUBLIC_STRINGS項目,都不會回來。
如果您使用OutlookSpy查看Outlook中的項目(單擊IMessage),您是否看到在該特定項目上設置的屬性? –
是的,我可以在預約項目的IMessage中看到它及其值。 – plusheen
這可能是相關的,雖然它在另一個方向* *:Outlook無法看到使用Exchange創建的擴展屬性http://stackoverflow.com/questions/6013173/creating-extended-property-using-ews-and-訪問它從 - Outlook的插件。也許你應該嘗試使用PropertyAccessor? –