1

Within Outlook 2013, if you want to add a custom flag to an item you get this dialog:

enter image description here

I am trying to figure out how to open this dialog using VBA? I can either open it for a selected e-mail item or if there is a way to open it directly and retrieve the date/data the user selected.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
IMTheNachoMan
  • 5,343
  • 5
  • 40
  • 89

1 Answers1

4

You can simulate pressing buttons with 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

You can see the "AddReminder" when you hover over the button when adding to the Quick Access Toolbar or a ribbon.

niton
  • 8,771
  • 21
  • 32
  • 52