vbaoutlook

Why would application.reminder stop working after a restart?


I found code, to bring Outlook reminders to the front of all other windows, on the Extend Office website. I entered it into the ThisOutlookSession module in Outlook 365:

Private Sub Application_Reminder(ByVal Item As Object)
'Updated by ExtendOffice 20180814
Dim xAppointment As AppointmentItem
If Item.Class = olAppointment Then
    Set xAppointment = Item
    MsgBox xAppointment.Subject, 4096 + vbInformation + vbOKOnly, "Outlook reminders"
End If
End Sub

Last week, whenever a reminder fired, I'd see a Msgbox reiterate its message.

This week, I realized that the Msgbox was no longer popping up.
I believe my computer restarted over the weekend. That's the only change I can think of.
I tried trapping the code with breakpoints, and as near as I can tell, it's not running.

I tried restarting Outlook.
I use two Desktops in Windows. I tried running Outlook on each.


Solution

  • First of all, you need to check the Trust Center settings in Outlook whether VBA macros are allowed to run. Then try to enable macros in Outlook by following:

    "File"->"Options"->"Trust Center"->"Trust Center Settings..."->"Macro Settings"->"Enable all macros"
    

    You may find similar issues posted in the Outlook Not Running Visual Basic After Restart and VB Macro runs successfully at first, but fails after Outlook restart posts.