这是我尝试在 Outlook 日历中查找约会:
var calendar = outlookApplication.GetNamespace("MAPI").GetDefaultFolder(OlDefaultFolders.olFolderCalendar);
if (calendar == null || calendar.Items == null)
{
return null;
}
DateTime appointmentStart = new DateTime(2013, 04, 02, 10, 0 ,0);
string filter = string.Format("[Start] = '{0}'", appointmentStart );
var calendarItems = calendar.Items.Restrict(filter);
这样我在日历中找不到约会者,但我在 2013 年 4 月 2 日 10:00:00 有一个。