[英]How to restrict all outlook appointments (including recurring) by property value using C#
如何使用C#通過屬性值限制所有Outlook約會(包括重復發生)。 我使用過濾器=“ @ SQL =( http://schemas.microsoft.com/mapi/string/ {00020329-0000-0000-C000-000000000046} / TestName不為空)”(其中TestName-屬性名)並設置calendarItems.IncludeRecurrences = true; 但我只得到簡單的約會結果
要檢索從滿足預定條件的文件夾中的所有Outlook約會項目,你需要排序升序項目和設置IncludeRecurrences為true。 如果在使用Restrict方法之前不進行定期約會,則不會捕獲該約會。
item = resultItems.GetFirst();
do
{
if (item != null)
{
if (item is Outlook._AppointmentItem)
{
counter++;
appItem = item as Outlook._AppointmentItem;
strBuilder.AppendLine("#" + counter.ToString() +
"\tStart: " + appItem.Start.ToString() +
"\tSubject: " + appItem.Subject +
"\tLocation: " + appItem.Location);
}
Marshal.ReleaseComObject(item);
item = resultItems.GetNext();
}
}
while (item != null);
您可能會發現以下文章有幫助:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.