5
正在使用EWS檢索我的Office 365帳戶中特定會議室的所有約會。當返回約會時,約會的主題屬性包含組織者的名字,而不是我給約會的主題。使用EWS檢索約會時,主題包含組織者名稱
我做錯了什麼?
代碼示例如何做IM的:
ExchangeService service = new ExchangeService();
service.Credentials = new WebCredentials("username", "password");
service.Url = new Uri("https://outlook.office365.com/EWS/Exchange.asmx");
DateTime StartDate = DateTime.Today.AddDays(-30);
DateTime EndDate = DateTime.Today.AddDays(60);
CalendarView cv = new CalendarView(StartDate, EndDate);
FolderId CalendarFolderId = new FolderId(WellKnownFolderName.Calendar, "[email protected]");
CalendarFolder calendar = CalendarFolder.Bind(service, CalendarFolderId);
FindItemsResults<Appointment> appointments = calendar.FindAppointments(cv);
foreach (Appointment appointment in appointments.ToList())
{
//this contains the wrong value.....
string subject = appointment.Subject;
//this is correct and has the same value as the incorrect subject
string organizer = appointment.Organizer.Name;
}
這應該被標記爲答案。謝謝! –