我試圖使用EWS約會的擴展屬性,但我似乎無法再次找到約會。集合屬性部分等於在這個問題上所示:Exchange Webservice託管API - 通過擴展屬性查找項目
How to Update an Appointment from Exchange Web Service Managed API 2.0 in ASP.NET
當我嘗試檢索約會,我都遵循這些例子:
http://msdn.microsoft.com/en-us/uc14trainingcourse_5l_topic3#_Toc254008129 http://msdn.microsoft.com/en-us/library/exchange/dd633697(v=exchg.80).aspx
但我在查找時從未得到任何返回的約會。
下面是查找代碼:
ItemView view = new ItemView(10);
// Get the GUID for the property set.
Guid MyPropertySetId = new Guid("{" + cGuid + "}");
// Create a definition for the extended property.
ExtendedPropertyDefinition extendedPropertyDefinition =
new ExtendedPropertyDefinition(MyPropertySetId, "AppointmentID", MapiPropertyType.String);
view.PropertySet =
new PropertySet(
BasePropertySet.IdOnly,
ItemSchema.Subject,
AppointmentSchema.Start,
AppointmentSchema.End, extendedPropertyDefinition);
SearchFilter filter = new SearchFilter.Exists(extendedPropertyDefinition);
FindItemsResults<Item> findResults = service.FindItems(WellKnownFolderName.Inbox, filter,
view);
任何幫助是極大的讚賞。
編輯: 當我試圖創建屬性,如文檔顯示:
http://msdn.microsoft.com/en-us/library/exchange/dd633654(v=exchg.80).aspx
它,因爲它的一個GUID IM作爲增加屬性值失敗。 : -/
再次編輯: 只是試圖讓今天所有的約會,並從我剛剛創建的任命獲得的財產,和它說的一樣,我存儲,而不{},所以它必須是與過濾器的東西。
編輯再次* 它具有財產以後做
ExtendedPropertyDefinition extendedProperty = new ExtendedPropertyDefinition(
如果我使用:
new ExtendedPropertyDefinition(
DefaultExtendedPropertySet.Appointment,
"AppointmentID",
MapiPropertyType.String);
它發現所有性質的約會,但如果我搜索一個特定一個:
Guid MyPropertySetId = new Guid("{" + cGuid + "}");
ExtendedPropertyDefinition extendedProperty =
new ExtendedPropertyDefinition(
MyPropertySetId,
"AppointmentID",
MapiPropertyType.String);
然後沒有發現。
謝謝,生病了試試看。 – Jacob 2013-02-28 13:13:42
適合我的作品!非常感謝! – Jacob 2013-02-28 14:05:12
你的歡迎...也許下一次你可以幫我;) 你可以請設置「是有益的」;) – 2013-02-28 15:35:56