【问题标题】:Get selected meeting from Calendar view从日历视图中获取选定的会议
【发布时间】:2016-10-05 16:02:05
【问题描述】:

如何使用 c# vsto 右键单击​​ Outlook 日历视图中的选定会议或约会。我发现这样做的唯一方法是获取 Outlook 文件夹并按开始和结束日期对其进行过滤。这种方法的问题是,如果在同一范围内找到两个约会,则无法选择显示哪个约会。有什么想法吗?

private void GetAppointment() 
{ 
 Outlook.Explorer expl = Application.ActiveExplorer(); 
 Outlook.Folder folder = expl.CurrentFolder as Outlook.Folder; 
 Outlook.View view = expl.CurrentView as Outlook.View; 
 if (view.ViewType == Outlook.OlViewType.olCalendarView) 
 { 
 Outlook.CalendarView calView = view as Outlook.CalendarView; 
 DateTime dateStart = calView.SelectedStartTime; 
 DateTime dateEnd = calView.SelectedEndTime; 

// Find the appointment

 } 
} 

【问题讨论】:

    标签: c# vba outlook vsto outlook-addin


    【解决方案1】:

    使用 Application.ActiveExplorer.Selection 集合。

    【讨论】:

      猜你喜欢
      • 2016-09-25
      • 1970-01-01
      • 1970-01-01
      • 2022-07-20
      • 2023-04-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多