问题描述
EWS使用默认的何时"文本在正文中创建约会.请参见下图:
EWS creates appointment with a default "When" text in the body. Please see the image below:
我想知道是否有可能以某种方式删除或隐藏此文本.
I am wondering if it is possible to remove or hide this text some how.
这是我的代码,该代码使用EWS托管API创建约会
Here is my code which create appointment using 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("[email protected]");
// create new appointment
newAppointment.Save(SendInvitationsMode.SendToAllAndSaveCopy);
推荐答案
我在上述相同的庄园中使用EWS创建了测试约会,并使用 MFCMAPI 和 EWS编辑器.通过MAPI,何时文本存储在PidTagHtml
属性中.通过EWS,何时文本存储在Body
属性中.接收到的副本中存在文本,但发件人的日历文件夹中的原始文本不存在.
I created test appointments using EWS in the same manor above and explored the properties of the objects using MFCMAPI and EWS Editor. Via MAPI the when-text is stored in the PidTagHtml
property. Via EWS the when-text is stored in the Body
property. The when-text exists on the received copy, but not on the original in the sender's calendar folder.
基于此,在发送时将何时文本插入到正文中.如果您删除该行
Based on this it appears the when-text is inserted to the body at send time. If you remove the line
newAppointment.RequiredAttendees.Add("[email protected]");
然后创建一个约会而不是会议.在这种情况下,何时文本不起作用.
then an appointment is created instead of a meeting. In that case the when-text doesn't come into play.
- 我敢肯定,除了进入收件人的邮箱并删除接收到的副本上的文本之外,没有其他方法可以解决此问题.
- 即使有更好的解决方法,我也不建议这样做,因为Outlook和OWA都在同一庄园中创建会议.
这篇关于删除EWS约会正文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!