0
我正在編碼一個應該同步Outlook約會與另一個系統的服務。創建約會後,我需要添加一些信息到正文。該服務在某個技術帳戶下運行,它也作爲所有者添加到Outlook中的組織者日曆中。但是,下面的代碼不會做任何更改:編輯其他用戶的交換約會
var _exchangeService = new ExchangeService(ExchangeVersion.Exchange2010_SP2, TimeZoneInfo.Local)
{
Url = new Uri(someUrl),
Credentials = new NetworkCredential(someUser, somePwd, someDomain)
};
Appointment appointment = Appointment.Bind(_exchangeService, someId, new PropertySet(AppointmentSchema.Subject, AppointmentSchema.Start, AppointmentSchema.End));
string oldSubject = appointment.Subject;
appointment.Subject = appointment.Subject + " moved one hour later and to the day after " + appointment.Start.DayOfWeek + "!";
appointment.Start.AddHours(25);
appointment.End.AddHours(25);
appointment.Update(ConflictResolutionMode.AlwaysOverwrite, SendInvitationsOrCancellationsMode.SendOnlyToAll);
示例代碼取自MSDN。當主辦單位和科技帳戶是同一用戶時,該代碼可以正常工作。
你有什麼想法可能是錯的?謝謝!
謝謝Glen。我希望有一些Exchange管理員權限可以讓我的用戶編輯其他約會。 –