为多封电子邮件设置自定义后续标记的宏

为多封电子邮件设置自定义后续标记的宏

我找到了一个代码,我可以调整它几乎让我达到我想要的目的;我希望能够选择多封电子邮件,然后单击按钮运行宏以将标记的跟进日期设置为从现在起的 X 天。我如何才能让此代码适用于多封选定的电子邮件?

Sub Set_3DaysFollowUp()

    Dim numDays As Double
    Dim uPrompt As String
    Dim MyMailItem As Object

    On Error Resume Next
    If ActiveInspector.CurrentItem.Class = olMail Then
        Set MyMailItem = ActiveInspector.CurrentItem
    End If

    If (ActiveExplorer.Selection.Count = 1) And _
          (ActiveExplorer.Selection.item(1).Class = olMail) Then

            Set MyMailItem = ActiveExplorer.Selection.item(1)

    End If

    MyMailItem.TaskDueDate = Now + 3
    MyMailItem.FlagRequest = "Follow up"

    MyMailItem.Save

End Sub

相关内容