C# 如何使用C按属性值限制所有outlook约会(包括定期约会)#
如何使用C#按属性值限制所有outlook约会(包括定期约会)。我用C# 如何使用C按属性值限制所有outlook约会(包括定期约会)#,c#,outlook,outlook-addin,C#,Outlook,Outlook Addin,如何使用C#按属性值限制所有outlook约会(包括定期约会)。我用 filter=“@SQL=({00020329-0000-0000-C000-0000000000 46}/TestName不为NULL)”(其中TestName-属性名称)并设置calendarItems.IncludeCurrences=true;但是我只获得简单约会结果要从满足预定义条件的文件夹中检索所有Outlook约会项目,您需要按升序排列这些项目并将其设置为true。如果在使用Restrict方法之前不这样做,您将
filter=“@SQL=({00020329-0000-0000-C000-0000000000 46}/TestName不为NULL)”(其中TestName-属性名称)并设置calendarItems.IncludeCurrences=true;但是我只获得简单约会结果要从满足预定义条件的文件夹中检索所有Outlook约会项目,您需要按升序排列这些项目并将其设置为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);
您可能会发现以下文章很有帮助:
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);
您可能会发现以下文章很有帮助: