Conditionally Remove Reminders from Outlook Appointments

I like to block out parts of my outlook calendar so that people cannot book me or send me invites for these times. The problem with this is I get reminders for each of these “Gap” appointments I create. So I wanted to find a way that I get standard reminders for all appointments except if the subject is Gap. So here is how I did it.

You need to ensure Visual Basic is enabled and installed as part of Outlook. You may have to add the Developer Section to the tool bar to get the Visual basic option. Copy the code below into the “ThisOutlookSession” page. Obviously this code looks for any appointment created with the subject of Gap or gap, you should update the code accordingly. I also through views have conditional formatting on for these appointment types.

Dim WithEvents curCal As Items

Private Sub Application_Startup()
Dim NS As Outlook.NameSpace
Set NS = Application.GetNamespace("MAPI")
' calendar to watch for new items
Set curCal = NS.GetDefaultFolder(olFolderCalendar).Items
Set NS = Nothing
End Sub

Private Sub curCal_ItemAdd(ByVal Item As Object)
Dim cAppt As AppointmentItem

If TypeOf Item Is Outlook.AppointmentItem And Item.Subject Like "[Gg]ap" Then

Set cAppt = Item
cAppt.ReminderSet = False

End If
End Sub

Leave a Reply

Your email address will not be published. Required fields are marked *