首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >检索EWS约会时,主题包含组织者名称

问检索EWS约会时,主题包含组织者名称
EN

Stack Overflow用户
提问于 2014-06-27 15:44:57
回答 1查看 1.9K关注 0票数 6

我正在检索我的office 365帐户中特定房间的EWS的所有约会。在返回约会时,约会的subject属性包含组织者的名称,而不是我指定的约会主题。

我做错了什么吗?

我如何做到这一点的代码示例:

代码语言:javascript
复制
ExchangeService service = new ExchangeService();
service.Credentials = new WebCredentials("username", "password");
service.Url = new Uri("https://outlook.office365.com/EWS/Exchange.asmx");

DateTime StartDate = DateTime.Today.AddDays(-30);
DateTime EndDate = DateTime.Today.AddDays(60);
CalendarView cv = new CalendarView(StartDate, EndDate);
FolderId CalendarFolderId = new FolderId(WellKnownFolderName.Calendar, "room1@company.com");

CalendarFolder calendar = CalendarFolder.Bind(service, CalendarFolderId);
FindItemsResults<Appointment> appointments = calendar.FindAppointments(cv);

foreach (Appointment appointment in appointments.ToList())
{
    //this contains the wrong value.....
    string subject = appointment.Subject;

    //this is correct and has the same value as the incorrect subject
    string organizer = appointment.Organizer.Name;
}
EN

回答 1

Stack Overflow用户

发布于 2014-06-28 07:43:11

您的代码没有任何问题,但这与邮箱的配置方式有关。使用Rooom邮箱,您可以使用远程Power-shell和set-calendarprocessing cmdlet配置自动处理设置,请参阅http://technet.microsoft.com/en-us/library/dd335046(v=exchg.150).aspx,例如

对于您的特定问题,已使用DeleteSubject参数配置邮箱,该参数“指定是删除还是保留传入会议请求的主题。此参数的有效输入为$true或$false。默认值为$true。”以及AddOrganizerToSubject参数,该参数“指定会议组织者的姓名是否用作会议请求的主题。此参数的有效输入为$true或$false。默认值为$true。”

您将无法修复现有数据,但如果您重新配置邮箱,发送的任何新约会都将按您所需的方式显示

干杯峡谷

票数 15
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24446558

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档