Outlook software in Microsoft 365 (Office 365) has an option to dismiss reminders on past appointments. Enable it in File > Options > Advanced > Automatically dismiss reminders for past calendar events.
The first macro is for those Outlook users who use Outlook's calendar as a journal and create appointments in the past. If you don't set the reminder to none, it will fire as soon as you create the appointment.
The second macro is for anyone who needs to remove reminders from old appointments.
We put appointments on the calendar that are in the past for record-keeping purposes. How can I stop the reminders for these appointments and keep reminders for future appointments?
To test, click in the Application_Startup macro and click the Run button.
Private WithEvents Items As Outlook.Items
Private Sub Application_Startup()
Dim Ns As Outlook.NameSpace
Set Ns = Application.GetNamespace("MAPI")
Set Items = Ns.GetDefaultFolder(olFolderCalendar).Items
End Sub
Private Sub Items_ItemAdd(ByVal Item As Object)
On Error Resume Next
Dim Appt As Outlook.AppointmentItem
If TypeOf Item Is Outlook.AppointmentItem And Item.Start < Now() Then
Set Appt = Item
Appt.ReminderSet = False
Appt.Save
End If
End Sub
Remove reminders on existing appointments
To remove reminders from existing appointments, use this VBA code. The reminders are removed from all appointments in the default calendar folder that have a start time prior to "now".
Public Sub RemoveReminder()
Dim Ns As Outlook.NameSpace
Dim Appt As Object
Set Ns = Application.GetNamespace("MAPI")
Set Items = Ns.GetDefaultFolder(olFolderCalendar).Items
For Each Appt In Items
On Error Resume Next
If Appt.Start < Now() Then
Appt.ReminderSet = False
Appt.Save
End If
Next
Set App = Nothing
Set Ns = Nothing
End Sub
More Information
This code is based on the VBA code at How to Remove Reminders on All Day Events
ikomrad says
How would you do this on a Mac?
Diane Poremsky says
This is not currently supported on mac.
Daniel says
Hi,
I read the above text as "the first macro will remove notifications from events created in the past without you needing to remove the events individual reminder"
Is that right, because that's what I'm looking for? :)
The reason I'm asking is that I'm new to VBA but use my calendar as a journal to keep track of my days, and I can't understand what I'm missing in my implementation, can you help?
Diane Poremsky says
Yes, the macro removes reminders on new events that occur in the past.
The code goes into thisoutlooksession, as its an automatic macro.
Wayne Erfling says
What about recurring appointments?
I don't know anything about the appointment / reminder object model and I don't want to delete the initial appearance of a reminder for a recurring meeting - I only want to delete it [from the "Reminders" pop-up window] when it slips into the past, and then only for that occurrence. I still want to see the reminder for the next occurrence of the meeting.
It seems silly that Microsoft hasn't yet offered a way to "open meeting and dismiss [this] reminder". It's like having to turn off your alarm clock twice when you get up.
Diane Poremsky says
Did you try restarting outlook using the /cleaneminders switch?
Close outlook, press windows key + R to open the run command, type or paste
outlook.exe /cleanreminders
in the open field and press enter.
Ikomrad says
Will this work on Outlook for Mac? I don't know how to run it there.
Diane Poremsky says
No, it won't. Sorry.
Paul Reavis says
I have conference room calendars I would like to remove reminders if they appear in the past. If I load the calendar as the default view for the conference room I would love not to have to look at reminders for past meetings that were not dismissed. I think your code would absolutely do the trick. Is there a way to automatically run the script when Outlook opens?
This is extremely helpful. Thank you for your help.
Diane Poremsky says
you could put it in a start up macro, but I'm not sure if it will fire fast enough...
in the start up folder, you'd add call RemoveReminder and tweak that macro to watch the correct folder.
i don't know if it might be better to have the reminder window do it - they would still fire but would be automatically dismissed. From the Application_Reminder macro, take out the part that creates the message (don't need the second if/end if but the one that looks only for appointments is needed) but keep the item.subject line and the very first. Macro is here - https://www.slipstick.com/developer/send-email-outlook-reminders-fires/#dismiss
Thomas says
This works great, almost. How about to apply to more than default calendar? I have a calendar called abcd. Past appointments created in abcd still have a reminder.
Diane Poremsky says
You have two choices: specify the calendar in this line:
Set Items = Ns.GetDefaultFolder(olFolderCalendar).Folders("abcd").Items
That assumes abcd is a subfolder of the calendar.
Or change it to work on the selected folder:
Set Items = Application.ActiveExplorer.CurrentFolder.Items
More info is at: https://www.slipstick.com/developer/working-vba-nondefault-outlook-folders/
Jeroen says
Great! Had this macro available in a previous install, reinstalled after migrating to Office 2013.... Works perfectly!
Eric M says
Thank you for this post! Very useful macros for managing calender items.
tonyt says
I am trying to add the 2nd script "Remove reminders on existing appointments" to the script menu under rules. It is not showing up as a script option. I would like to create a rule to run the script, from a certain email addresses, to delete the reminders that have expired "now". Thank you for your help.
Diane Poremsky says
That one doesn't run with rules. Try adding (Item As Outlook.MailItem) the macro name:
Public Sub RemoveReminder(Item As Outlook.MailItem)
Omar says
Is it possible to modify this to remove the reminder if it is in a specific category? I have a category called "PTO/OOO/WFH" that I use for people scheduling vacation days or working from home and I'm a bit tired of getting the reminders at 1145pm. I have a rule set to assign the category as the appointments come in.
If I change "Appt.Start < Now()" to "Appt.Categories = "PTO/OOO/WFH"" in the second code snip would that do what I am looking for?
Diane Poremsky says
Correct, that should work. If the item can might have more than one category, use instr to look for it.
If Appt.Categories = "PTO/OOO/WFH" Then
or
If Instr(Appt.Categories, "PTO/OOO/WFH") > 0 Then