How to Auto Remove Canceled Meetings from Your Outlook Calendar

You may have noticed that the canceled meetings will still exist in your calendar. It demands you to remove it manually, which is too troublesome. Thus, you must wish that Outlook can auto remove canceled meetings. This post will help you realize it.

Actually, my previous article – “How to Remove Canceled Meetings from Outlook Calendar Tactfully” has introduced few tips to delete canceled meetings manually. Also, in the last section of that article, there is a way to let Outlook auto remove the canceled meetings. But that method will also let Outlook auto accept all the meeting invitation. This is not what you want at times. Therefore, here we’ll show you another way, which is pretty simple and much more convenient.

Auto Remove Canceled Meetings from Your Outlook Calendar

Auto Remove Canceled Meetings from Calendar

  1. At the very outset, start your Outlook program.
  2. Then, you ought to press “Alt + F11” key buttons in Outlook window.
  3. Next, in the subsequent VBA editor window, you need to double click on the “ThisOutlookSession” project on the left side.
  4. Subsequently, you should copy the following VBA code into this project.
Private WithEvents objInbox As Outlook.Folder
Private WithEvents objItems As Outlook.Items

Private Sub Application_Startup()
    Set objInbox = Application.Session.GetDefaultFolder(olFolderInbox)
    Set objItems = objInbox.Items
End Sub

'Occurs when the meeting cancellation arrives in your Inbox
Private Sub objItems_ItemAdd(ByVal Item As Object)
    Dim objCalendar As Outlook.Folder
    Dim objAppointments As Outlook.Items
    Dim i As Long
    Dim objMeeting As Outlook.AppointmentItem
 
    If TypeOf Item Is MeetingItem Then
       If Left(LCase(Item.Subject), 9) = "canceled:" Then
          'Remove canceled meeting
          Set objCalendar = Application.Session.GetDefaultFolder(olFolderCalendar)
          Set objAppointments = objCalendar.Items
 
          For i = objAppointments.count To 1 Step -1
              Set objAppointment = objAppointments.Item(i)
              If Left(objAppointment.Subject, 9) = "Canceled:" Then
                 objAppointment.Delete
              End If
         Next
       End If
   End If
End Sub

VBA Code - Auto Remove Canceled Meetings from Calendar

  1. After that, you can assign a digital certificate to this project. Click “Tools” and choose “Digital Signature”. Then follow the wizard to complete it.
  2. Later, close the “Microsoft Visual Basic for Applications” window and head to change your Outlook macro settings to permit signed macros.
  3. Eventually, you could restart your Outlook to enable the new VBA project.
  4. Since then, every time when a meeting cancellation arrives in your Inbox, the macro will start and auto remove the canceled meeting from the calendar.

Make Full Use of Inbox Repair Tool

Many Outlook users may have been plagued by assorted issues in their Outlook, including small malfunctions, error messages, and sudden not responding as well as serious damages, etc. To be honest, for the small issues, Outlook has an inbuilt repair tool – Scanpst, which can fix them with ease. Thereby, when coming across troubles in Outlook, you can use it to take a shot. If it fails, you could continue to take aid of an experienced and remarkable third party tool, such as DataNumen Outlook Repair.

Author Introduction:

Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including sql recovery and outlook repair software products. For more information visit www.datanumen.com

4 responses to “How to Auto Remove Canceled Meetings from Your Outlook Calendar”

  1. Also – if I’m not mistaken (and I haven’t tested) then this would delete the appointment from the calendar, but leave the cancellation email in your inbox, no? Additionally, this as written would loop through EVERY appointment on your calendar anytime you receive a cancellation? It seems like it would be more concise to Set objAppointment = Item.GetAssociatedAppointment(True) and then delete objAppointment and Item so that the cancellation isn’t in the inbox any longer.

  2. Are we using “Dim objMeeting As Outlook.AppointmentItem” in this macro at all? Or was that an extra variable that was going to be used for the appointment type of items, but instead of setting it prior to deleting, you just deleted anything starting with that subject?

    If Left(objAppointment.Subject, 9) = “Canceled:” Then
    objAppointment.Delete

Leave a Reply

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