How can I set Outlook 2010 to automatically remove cancelled meetings

Outlook 2010 has a single option for auto accepting meeting requests and remove canceled meetings under: File->Options->Calendar->Resource scheduling

Under this option meeting requests are automatically accepted. I don't want this. I want to do the following:

  • Remove canceled meetings from the calender
  • Delete Canceled:... meeting emails from my Inbox
  • Don't do anything with meeting requests

Is this possible?


Solution 1:

I found the answer by searching the exact question you were asking.

You will have to create a macro with the following source code (Change the mailbox's name to your own):

Set olResCalendar = OpenMAPIFolder("\MailboxName\Calendar")
Sub RemoveCanceledAppointments()

Dim olResCalendar As Outlook.MAPIFolder, olApptItem As Outlook.AppointmentItem, intCounter As Integer

'Change the path to the resource calendar on the next line
Set olResCalendar = OpenMAPIFolder("\MailboxName\Calendar")

For intCounter = olResCalendar.Items.Count To 1 Step -1
Set olApptItem = olResCalendar.Items(intCounter)
    If Left(olApptItem.Subject, 9) = "Canceled:" Then
    olApptItem.Delete
    End If
Next
Set olApptItem = Nothing
Set olResCalendar = Nothing
End Sub

Function OpenMAPIFolder(szPath)
Dim app, ns, flr, szDir, i
Set flr = Nothing
Set app = CreateObject("Outlook.Application")
    If Left(szPath, Len("\")) = "\" Then
    szPath = Mid(szPath, Len("\") + 1)
    Else
    Set flr = app.ActiveExplorer.CurrentFolder
    End If

While szPath <> ""
i = InStr(szPath, "\")
    If i Then
    szDir = Left(szPath, i - 1)
    szPath = Mid(szPath, i + Len("\"))
    Else
    szDir = szPath
    szPath = ""
    End If
    If IsNothing(flr) Then
    Set ns = app.GetNamespace("MAPI")
    Set flr = ns.Folders(szDir)
    Else
    Set flr = flr.Folders(szDir)
    End If
    Wend
Set OpenMAPIFolder = flr
End Function

Function IsNothing(Obj)
If TypeName(Obj) = "Nothing" Then
    IsNothing = True
Else
    IsNothing = False
End If
End Function

Quote from the Page:

This macro will search through a resource calendar and delete items with "Canceled:" in the subject. You also must have proper permissions on the resource mailbox for this to work. This macro will remove cancelled meetings will remove both direct booking and autoaccepted meetings.