0
我正在使用EWS來管理Exchange Server電子郵件帳戶的操作。如何導出.ics文件中的所有約會日曆? 我已經嘗試遵循。如何使用EWS將.ics文件中的所有約會導出?
string iCalFileName = Path.Combine(Path.GetTempPath(), "appointments.ics");
foreach (Appointment appointment in service.FindItems(WellKnownFolderName.Calendar, new ItemView(int.MaxValue)))
{
appointment.Load();
using (FileStream fs = new FileStream(iCalFileName, FileMode.Create, FileAccess.Write))
{
using (StreamWriter s = new StreamWriter(fs))
{
s.WriteLine(appointment.MimeContent.Content);//error must load property before using it
}
}
}
有人能告訴我我在這裏失蹤了嗎?
我要導出所有預約ics文件相同,如Gmail。我已經嘗試過,但我沒有獲得成功。我曾嘗試通過https://msdn.microsoft.com/en-us/library/office/dn672317(v=exchg.150).aspx。我也試過你的解決方案。你能建議我鏈接或例子,這有助於我導出所有的約會/會議在ics文件? –
我建議你先發布日曆http://blogs.technet.com/b/exchange/archive/2014/04/15/how-to-publish-anonymous-calendar-sharing-url-in-exchange-online -or-exchange-2013.aspx,那麼你可以得到像Imail一樣的Ical Feed。 –