【问题标题】:Dragging and Dropping Folder from outlook to windows form将文件夹从 Outlook 拖放到 Windows 窗体
【发布时间】:2015-07-01 13:37:56
【问题描述】:

有谁知道如何将整个文件夹从 Outlook 拖放到 Windows 窗体上?我可以轻松地安静地拖放 MailItems,但是,我似乎无法使用文件夹这样做。我试图完成的最终目标是将一个文件夹从我的收件箱拖到一个 windows 窗体中,并能够遍历文件夹中的子文件夹和邮件项目,这些文件夹和邮件项目被拖放到 windows 窗体上。

对于邮件项目,我在 DragDrop 事件处理程序中执行以下操作:

if (e.Data.GetDataPresent("FileGroupDescriptor"))
{
     Outlook.Application outlook = new Microsoft.Office.Interop.Outlook.Application();
     foreach (object mailBoxItem in outlook.ActiveExplorer().Selection)
    { // Handle mail items }
}

【问题讨论】:

    标签: c# winforms drag-and-drop outlook


    【解决方案1】:

    Explorer 类提供CurrentFolder 属性,该属性返回一个Folder 对象,该对象表示资源管理器中显示的当前文件夹。但我认为您不能将文件夹拖放到某处。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-25
      • 2012-02-14
      • 2010-09-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多