【问题标题】:How to track when email is categorized?如何跟踪电子邮件何时分类?
【发布时间】:2019-06-16 11:49:24
【问题描述】:

我们使用 Outlook 作为日常工作的主要工具。

从员工为邮件分配类别开始,到发送此邮件时结束。

我想提取邮件在发送时的分类时间(日期和时间、类别名称)以及此邮件的主题,并将其提取到 Excel 工作表中。

我计划将这样的宏添加到 ThisOutlookSession 中。我不知道如何从 Outlook 中提取类别事件。

我只能在发送电子邮件时提取?

【问题讨论】:

    标签: excel vba email outlook


    【解决方案1】:

    您需要处理当对象的显式内置属性(例如,Categories)发生更改时触发的PropertyChange 事件。已更改的属性名称作为参数传递给事件处理程序。例如,原始草图:

     Private WithEvents olExplorer As Outlook.Explorer
     Private olCurSel As Selection
     Private WithEvents olCurSelItem As Outlook.MailItem
    
     Private Sub olExplorer_SelectionChange()
      Set olCurSel = olExplorer.Selection
      Set olCurSelItem = Nothing
       If TypeName(olCurSel.Item(1)) = "MailItem" Then
        Set olCurSelItem = olCurSel.Item(i)
       End If
     End Sub
    
     Private Sub olCurSelItem_PropertyChange(ByVal Name As String)
      Debug.Print Name
     End Sub
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-18
      • 2020-09-03
      • 2011-06-30
      • 1970-01-01
      • 2011-07-21
      • 2017-08-11
      相关资源
      最近更新 更多