【问题标题】:Removing EWS Appointment Body Text删除 EWS 约会正文文本
【发布时间】:2012-07-19 02:26:13
【问题描述】:

EWS 在正文中使用默认的“时间”文本创建约会。请看下图:

我想知道是否可以通过某种方式删除或隐藏此文本。

这是我使用 EWS 托管 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);

【问题讨论】:

  • 之后是否可以按照this answer 中的说明更改正文?
  • @blahdiblah 该链接与阅读或更新现有约会有关。在上面的示例中,我正在尝试创建新约会。不知道为什么,但 EWS 在发送通知之前会自动添加自己的文本。
  • 是的,我意识到这不是您要寻找的内容,但认为在创建约会正文后立即更改它可能就足够了。 EWS 添加自己的文本绝对是奇怪的,真是痛苦。

标签: exchangewebservices outlook-2010


【解决方案1】:

我在上面的同一个庄园中使用 EWS 创建了测试约会,并使用 MFCMAPIEWS Editor 探索了对象的属性。通过 MAPI,when-text 存储在 PidTagHtml 属性中。通过 EWS,when-text 存储在 Body 属性中。 when-text 存在于收到的副本上,但不存在于发件人日历文件夹中的原件上。

基于此,when-text 似乎在发送时插入到正文中。如果您删除该行

newAppointment.RequiredAttendees.Add("first.last@acme.com");

然后创建约会而不是会议。在那种情况下,when-text 不会发挥作用。

  1. 我很确定除了进入收件人的邮箱并删除收到的副本上的文本之外,没有其他方法可以解决此问题。
  2. 即使有更好的解决方法,我也不建议这样做,因为 Outlook 和 OWA 在同一个庄园中创建会议。

【讨论】:

    猜你喜欢
    • 2013-08-26
    • 2012-06-29
    • 2011-06-01
    • 1970-01-01
    • 1970-01-01
    • 2017-12-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多