Skip to content

Instantly share code, notes, and snippets.

@MikeSel
Created August 28, 2014 14:54
Show Gist options
  • Save MikeSel/cef989ae9c27eefd6862 to your computer and use it in GitHub Desktop.
Save MikeSel/cef989ae9c27eefd6862 to your computer and use it in GitHub Desktop.
Private Sub Application_Reminder(ByVal Item As Object) 'Grab the outlook reminder fire event and force reminder window to front
If Not (Application.ActiveWindow Is Nothing) Then 'If the ActiveWindow exists
Dim myOutlook As Object 'Outlook application object declaration
Set myOutlook = GetObject(, "Outlook.Application") 'Get the outlook application object
If myOutlook.ActiveWindow.WindowState = olMinimized Then 'If outlook application minimized then
Application.ActiveExplorer.Activate 'Activate Outlook application window
Else 'If Outlook application not minimized then
Application.ActiveExplorer.Activate 'Activate Outlook application window
End If
End If
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment