open/execute Outlook 的自定义标志对话框弹出 VBA

open/execute Outlook's Custom flag dialog popup with VBA

在 Outlook 2013 中,如果您想向项目添加自定义标志,您会看到此对话框:

我想知道如何使用 VBA 打开这个对话框?我可以为选定的电子邮件项目打开它,或者如果有办法直接打开它并检索用户选择的 date/data。

您可以使用 ExecuteMso

模拟按下按钮
Private Sub AddReminderDialog_ExecuteMso()

    Dim objItem As Object

    On Error Resume Next
    Set objItem = ActiveInspector.currentItem
    On Error GoTo 0

    If Err <> 0 Then
        ActiveInspector.CommandBars.ExecuteMso ("AddReminder")
    Else
        ActiveExplorer.CommandBars.ExecuteMso ("AddReminder")
    End If

End Sub

将鼠标悬停在添加到快速访问工具栏或功能区的按钮上时,您可以看到 "AddReminder"。