EWS 使用正文中的默认“何时”文本创建约会。请看下图:
我想知道是否可以以某种方式删除或隐藏此文本。
这是我使用 EWS Managed API 创建约会的代码
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP1, TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time"));
service.Credentials = new WebCredentials("ews_calendar", PASSWORD, "acme");
service.Url = new Uri("https://acme.com/EWS/Exchange.asmx");
Appointment newAppointment = new Appointment(service);
newAppointment.Subject = "Test Subject";
newAppointment.Body = "Test Body";
newAppointment.Start = new DateTime(2012, 07, 19, 17, 00, 0);
newAppointment.End = newAppointment.Start.AddMinutes(30);
newAppointment.RequiredAttendees.Add("first.last@acme.com");
// create new appointment
newAppointment.Save(SendInvitationsMode.SendToAllAndSaveCopy);
最佳答案
我在上面的同一庄园中使用 EWS 创建了测试约会,并使用 MFCMAPI 探索了对象的属性。和 EWS Editor .通过 MAPI,when-text 存储在 PidTagHtml
中属性(property)。通过 EWS,when-text 存储在 Body
中。属性(property)。 when-text 存在于接收的副本中,但不存在于发件人日历文件夹中的原始文本中。
基于此,似乎在发送时将 when-text 插入到正文中。如果删除该行
newAppointment.RequiredAttendees.Add("first.last@acme.com");
然后创建约会而不是 session 。在这种情况下, when-text 不会起作用。
关于exchangewebservices - 删除 EWS 约会正文文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11568699/