2017-06-12 48 views
0

任何人都知道如何使用EWS在线会议(Lync/Skype)创建会议请求?使用Microsoft的EWS创建在线Lync/Skype会议

所以我的方法是首先获取通过Outlook创建的在线和定期会议,然后模拟使用相同属性创建事件。

这里是获取会议(calendarView已经开始日期,结束日期等初始化)我的代码片段:

ExtendedPropertyDefinition extendedOnlineMeetingProperty = 
       new ExtendedPropertyDefinition(new Guid("{00062008-0000-0000-c000-000000000046}"), 34112, 
        MapiPropertyType.Integer); 

var properties = new PropertySet(
      ItemSchema.Id, 
      AppointmentSchema.ICalUid, 
      ItemSchema.Subject, 
      AppointmentSchema.Start, 
      AppointmentSchema.End, 
      AppointmentSchema.Organizer, 
      AppointmentSchema.Location, 
      AppointmentSchema.LegacyFreeBusyStatus, 
      AppointmentSchema.IsCancelled, 
      AppointmentSchema.ICalRecurrenceId, 
      AppointmentSchema.MyResponseType, // Mandatory Meeting.MyResponseType can be retrieved without a search in the participant list 
      ItemSchema.LastModifiedTime, 
      AppointmentSchema.IsOnlineMeeting, 
      AppointmentSchema.IsMeeting, 
      ItemSchema.DisplayTo) { }; 

properties.Add(extendedOnlineMeetingProperty); 


var activeResults = service.FindAppointments(WellKnownFolderName.Calendar, calendarView).ToList(); 
    if (activeResults.Count > 0) 
    { 
     service.LoadPropertiesForItems(activeResults, properties); 
    } 

我得到了财产IsOnlineMeeting用正确的布尔值(测试 - 创建 在线和定期与Outlook会议)变量activeResults,但我不明白在哪里获得会议链接和其他Lync/Skype属性需要加入会议。

此外,我不确定在哪里以及如何分配Lync/Skype会议URL和其他属性的值。

有时我会问自己是否值得开发一些基于MS产品的应用程序,因为它们的文档很糟糕。

回答

0

诅咒MS一周后,我找到了解决办法。使用MFCMAPI工具,您可以检查邮箱中物品的属性及其值。

  1. 下载程序link
  2. 构建和运行它
  3. 会议 - 登录 - 选择您的邮件配置文件 - 选择邮箱并双击
  4. 行动 - 打开特殊的文件夹 - 日历 - 上双日历,请点击
  5. 使用在线S4B/Lync会议打开该项目
  6. UC *属性是我正在寻找的属性。

如果打开的属性,你可以看到在顶部是这样的:

ag: 0x8096001E 
Type: PT_STRING8 
DASL: http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/UCMeetingSetting 
Named Prop Name: UCMeetingSetting 
Named Prop Guid: {00020329-0000-0000-C000-000000000046} = PS_PUBLIC_STRINGS 

所以我的扩展属性的定义是错误的。这不仅是一个财产,但实际上你需要全部7个财产。

所以定义应该是:

private static ExtendedPropertyDefinition CreateOnlineMeetingProperty() 
     { 
      ExtendedPropertyDefinition extendedUCMeetingSetting = 
       new ExtendedPropertyDefinition(new Guid("{00020329-0000-0000-C000-000000000046}"), "UCMeetingSetting", 
        MapiPropertyType.String); 

      return extendedUCMeetingSetting; 
     } 

通过正确的扩展定义,你可以从该项目获取值很容易。

  1. 访问的ExtendedProperties
  2. Value使用上述步骤,你可以得到你想要的任何扩展属性,不仅统一通信(UC)的属性调用TryGetProperty
var activeResults = service.FindAppointments(new 
FolderId(WellKnownFolderName.Calendar, resource.Email),calendarView).ToList(); 

service.LoadPropertiesForItems(activeResults, properties); 

foreach (Appointment result in activeResults) 
{ 
// 1. 
var b = result.ExtendedProperties[1].Value; 
// 2. 
string UCMeetingSetting; 
result.TryGetProperty(extendedUCMeetingSetting, out UCMeetingSetting); 
} 

+0

你能帮我解决这个问题吗?如何将Skype会议链接添加到使用EWS创建的新会议邀请中? – Ian

+0

Hi @Ian发布更多信息的问题,我或其他人会尽力帮助。 – pandemic

+0

那么在StackOverflow上有关于这个主题的很多问题。不过,我觉得这是解决我的问题的可能方案。基本上我想创建一个Skype的链接并将其添加到Outlook会议。我对此做了一项研究,看到我们需要使用其他apis来做到这一点。 – Ian