The Computer Oracle

How to make Outlook Calendar reminders stay on top in Windows 7

--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Puddle Jumping Looping

--

Chapters
00:00 How To Make Outlook Calendar Reminders Stay On Top In Windows 7
00:34 Answer 1 Score 13
01:36 Accepted Answer Score 63
02:53 Answer 3 Score 6
03:36 Answer 4 Score 21
03:58 Thank you

--

Full question
https://superuser.com/questions/251963/h...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#windows #microsoftoutlook #calendar #popups #reminder

#avk47



ACCEPTED ANSWER

Score 63


I had the same problem with Outlook 2010. Use the steps mentioned below, it works like a charm. Don't forget to enable all macros: Trust Center > Macro Settings.

  • Create a Digital certificate for later: Hit Start and type 'certificate', select 'Digital Certificate for VBA Projects'
  • Enter a name for your certificate. Click OK. Open Outlook and hit Alt + F11 to start the VBA editor.
  • In the tree on the left, expand 'Microsoft Office Outlook Objects' and double click on 'ThisOutlookSession'
  • Paste in this code:

    Private Declare PtrSafe Function FindWindowA Lib "user32" _
    (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    
    Private Declare PtrSafe Function SetWindowPos Lib "user32" ( _
    ByVal hwnd As Long, ByVal hWndInsertAfter As Long, _
    ByVal X As Long, ByVal Y As Long, ByVal cx As Long, _
    ByVal cy As Long, ByVal wFlags As Long) As Long
    
    Private Const SWP_NOSIZE = &H1
    Private Const SWP_NOMOVE = &H2
    Private Const FLAGS As Long = SWP_NOMOVE Or SWP_NOSIZE
    Private Const HWND_TOPMOST = -1
    
    Private Sub Application_Reminder(ByVal Item As Object)
    Dim ReminderWindowHWnd As Variant
    On Error Resume Next
    ReminderWindowHWnd = FindWindowA(vbNullString, "1 Reminder")
    SetWindowPos ReminderWindowHWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS
    
    End Sub
    
  • Sign the Macro so it will run: Tools > Digital Signature... and choose the certificate you created earlier

  • Close the VBA window
  • Enable all macros in File > Options > Trust Center > Trust Center Settings > Macro Settings



ANSWER 2

Score 21


AutoHotKey can also be used to solve this. This script will put the reminder window on top without stealing focus (tested with Win10 / Outlook 2013)

TrayTip Script, Looking for Reminder window to put on top, , 16
SetTitleMatchMode  2 ; windows contains
loop {
  WinWait, Reminder(s), 
  WinSet, AlwaysOnTop, on, Reminder(s)
  WinRestore, Reminder(s)
  TrayTip Outlook Reminder, You have an outlook reminder open, , 16
  WinWaitClose, Reminder(s), ,30
}

AHK Script - Compiled EXE




ANSWER 3

Score 13


The best answer I've found is here: How to get Outlook appointment reminders to pop up in front of other windows again using some simple VBA.

It entails adding a few lines of simple VBA code to "ThisOutlookSession". Now, it pops up a window every time. Much better.

  • Create a Digital certificate for later
  • Hit Start and type ‘certificate’, select ‘Digital Certificate for VBA Projects’
  • Enter a name for your certificate
  • Done
  • Open Outlook and hit Alt + F11 to start the VBA editor.
  • In the tree on the left, expand ‘Microsoft Office Outlook Objects' and double click on ‘ThisOutlookSession’
  • Paste in this code, modifying the text in quotes to suit your preferences. Leave the quotes in.

    Private Sub Application_Reminder(ByVal Item As Object)
    
    
        If TypeOf Item Is AppointmentItem Then
        MsgBox "Message text", vbSystemModal, "Message title"
        End If
    
    
    End Sub
    
  • Sign the Macro so it will run by going to Tools > Digital Signature… and choosing the certificate you created earlier

  • Close the VBA window



ANSWER 4

Score 6


Same as Gullu's anwer above but with change to accommodate different window title:

Private Declare PtrSafe Function FindWindowA Lib "user32" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Private Declare PtrSafe Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long

Private Const SWP_NOSIZE = &H1
Private Const SWP_NOMOVE = &H2
Private Const FLAGS As Long = SWP_NOMOVE Or SWP_NOSIZE
Private Const HWND_TOPMOST = -1

'// TO ACCOUNT FOR WINDOW TITLE CHANGING WITH NOTIFICATION COUNT:
Private Sub Application_Reminder(ByVal Item As Object)
    Dim ReminderWindowHWnd As Variant
    'On Error Resume Next
    On Error GoTo err
    'Loop 25 times as FindWindowA needs exact title which varies according to number of reminder items...
    Dim iReminderCount As Integer
    For iReminderCount = 1 To 25
        'Try two syntaxes...
        ReminderWindowHWnd = FindWindowA(vbNullString, iReminderCount & " Reminder"): SetWindowPos ReminderWindowHWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS
        ReminderWindowHWnd = FindWindowA(vbNullString, iReminderCount & " Reminder(s)"): SetWindowPos ReminderWindowHWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS
    Next
Exit Sub
err:
    Debug.Print err.Number & " - " & err.Description & " (iReminderCount = " & iReminderCount & ")"
    Resume Next
End Sub