• Outlook User
  • New Outlook app
  • Outlook.com
  • Outlook Mac
  • Outlook & iCloud
  • Developer
  • Microsoft 365 Admin
    • Common Problems
    • Microsoft 365
    • Outlook BCM
    • Utilities & Addins

Remove Cancelled Meeting Requests from Resource Calendar

Slipstick Systems

› Outlook › Calendar › Remove Cancelled Meeting Requests from Resource Calendar

Last reviewed on July 22, 2019     12 Comments

Applies to: Exchange 2010, Exchange 2016, Exchange 2019, Office 365 Exchange

When someone cancels a meeting, the cancellation notice removes the meeting from the attendees calendar automatically but does not remove it from the resource calendar. This is to preserve a historical list of use for resource planning purposes and shows users possible conflicts.

Microsoft recommends using a custom view to hide cancelled meetings from users.

Note the Free/Busy should update (on the next scheduled Free/Busy publish) to reflect the cancelled meeting (the time will be shown as Free), so leaving the cancelled meetings in place should not affect scheduling.

Administrators can set the RemoveOldMeetingMessages parameter to remove cancelled meetings from resource calendars as the meetings are canceled.

Please note that this applies to meetings cancelled after setting RemoveOldMeetingMessages to true. It will not remove items cancelled previously; these will need to be removed manually, either using the macro or a filtered view that displays only canceled meetings. It also will not remove meetings created by Direct Booking (where the user opens the room calendar), the resource needs to be invited.

In Exchange 2010 and newer, including Office 365 Exchange online, use the Set-CalendarProcessing cmdlet:

Set-CalendarProcessing -Identity "room1" -RemoveOldMeetingMessages $true

In Exchange 2007, use the Set-MailboxCalendarSettings cmdlet:

Set-MailboxCalendarSettings -Identity "room1" -RemoveOldMeetingMessages $true

Macro to remove cancelled meetings

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.

Don't forget to change this line to the correct mailbox name:
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

How to use the RemoveCanceledAppointments macro

The RemoveCanceledAppointments macro will search through a resource calendar and delete all canceled appointment items. It searches the resource calendar, looking for appointments with a subject beginning with "Canceled:". It works in all versions of Outlook and can be used on Exchange 2007 and Exchange 2010 resource mailboxes, if the RemoveOldMeetingMessages parameter is not set to true.

If a cancellation notice wasn't sent, then there is no way to know if a meeting was canceled.

Before beginning, if your macro security settings are not configured to allow macros to run, you'll need to take care of this:

  1. Go to Tools, Macro, Security
  2. Set the Security Level to Medium
  3. Close Outlook
  4. Restart Outlook

Depending on your version of Outlook, you may need to restart it in order to use the macro.

Next you'll need to

  1. Add the resource mailbox to your profile. You must have permissions on the resource mailbox for this to work.
  2. Press Alt+F11 to open the VB editor
  3. If not already expanded, expand ThisOutlookSession
  4. Copy the macro and paste it into the right-hand pane of the VB Editor
  5. Edit the macro as needed (Remember to change the mailbox name!)
  6. Save the changes
  7. Run the macro (press F5 to run it in the VB Editor)

More Information

Set-CalendarProcessing

Remove Cancelled Meeting Requests from Resource Calendar was last modified: July 22nd, 2019 by Diane Poremsky
Post Views: 92

Related Posts:

  • Meeting Organizer's Name Appears in the Subject line
  • Automatically decline recurring appointments
    Resource has declined your meeting because it is recurring
  • An administrator asked: When we add any new meeting request we get thi
    Get-MailboxCalendarSettings
  • Keep Canceled Meetings on Outlook's Calendar

About Diane Poremsky

A Microsoft Outlook Most Valuable Professional (MVP) since 1999, Diane is the author of several books, including Outlook 2013 Absolute Beginners Book. She also created video training CDs and online training classes for Microsoft Outlook. You can find her helping people online in Outlook Forums as well as in the Microsoft Answers and TechNet forums.

Comments

  1. Bence S says

    June 18, 2019 at 4:43 am

    Hallo,

    I am wondering if that is possible to delete a canceled meeting in series aswell

    Reply
    • Diane Poremsky says

      June 18, 2019 at 7:30 am

      Delete a single occurrence in a series using a macro? Yes, but it would be a complicated macro as you need to get all of the events in the series and delete one.

      Reply
  2. Bence S says

    May 1, 2019 at 9:11 am

    I am thinking if it is possible to use this macro with several mailboxes at once.

    Reply
    • Diane Poremsky says

      May 1, 2019 at 9:56 am

      Yes. You need to loop the mailboxes - using select case to set the mailbox might work best.
      for i = 1 to [total mailboxes]
      select case i
      case 1
      Set olResCalendar = OpenMAPIFolder("\MailboxName\Calendar")
      case 2
      Set olResCalendar = OpenMAPIFolder("\Mailbox2Name\Calendar")
      'case for each mailbox
      end select

      ' do the removals

      next i

      Reply
      • Bence S says

        June 17, 2019 at 10:06 am

        Thank you! However I have encountered an other problem. I try to explain it clear. When a single occurence is canceled within a series, then this script can not delete that single item. If I cancel the entire series, then it works well (removes all meetings).
        In the calendar it looks the same - as if the single meetings subject has changed to "Canceled:.." while the others have not, but still script can't find it.
        (It should be something with the recurring meetings subject. I expect it is stored for the entire series and somehow differently for the occurences within.)
        Is it possible to delete them?

  3. kimber P says

    January 13, 2016 at 11:37 am

    My organization would like to remove room reservations for an employee who leaves the organization- to free the room reservations and show the rooms as free. can this be done?

    Reply
  4. Tammy Barbara says

    February 8, 2015 at 9:16 am

    An employee booked a recurring meeting in a conference room, then departed the organization. How can that meeting be removed?

    Reply
    • Diane Poremsky says

      February 8, 2015 at 11:47 am

      If someone with owner permissions to the conference room can't delete it from the calendar, you'll need to use MFCMAPI to delete it. Note that attendees will need to delete it from their own calendar.

      If the person's mailbox is still available, the admin can log into it and cancel any meeting on the calendar.

      Reply
  5. Obi says

    January 30, 2015 at 7:27 am

    Hello i am getting a compile error when i try to run the script.

    On this line it says that the sub or function is not defined and the script does'nt run.
    Set olResCalendar = OpenMAPIFolder("\MailboxName\Calendar")

    Reply
    • Diane Poremsky says

      January 30, 2015 at 8:45 am

      You should definitely have the openmapifolder function - it's in the code - Function OpenMAPIFolder(szPath).
      That is the name of the calendar as it is listed in your folder list?

      Reply
  6. Ryan says

    April 28, 2014 at 7:36 pm

    I tried to get this setting changed with IT but they said they cannot change it to automatically remove from the resource as not all users have "accepted" the meeting cancellation email, of which it then removes once all accepted.

    Are they telling me lies in that you can clear cancelled meetings even if people don't accept the cancellation email? if so does that mean users will get a cancellation email and just not see it anymore in their own calandars?

    Reply
    • Diane Poremsky says

      May 2, 2014 at 9:38 pm

      You can delete it - users don't "accept" cancellation. When you cancel a meeting, invitees are notified and the appointment is removed from their calendar. The only reason to leave it on the resource is for history - many sites find it useful when they review resource usage.

      Reply

Leave a Reply Cancel reply

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

Visit Slipstick Forums.
What's New at Slipstick.com

Latest EMO: Vol. 31 Issue 7

Subscribe to Exchange Messaging Outlook






Support Services

Do you need help setting up Outlook, moving your email to a new computer, migrating or configuring Office 365, or just need some one-on-one assistance?

Our Sponsors

CompanionLink
ReliefJet
  • Popular
  • Latest
  • Week Month All
  • Use Classic Outlook, not New Outlook
  • How to Remove the Primary Account from Outlook
  • Reset the New Outlook Profile
  • Disable "Always ask before opening" Dialog
  • How to Hide or Delete Outlook's Default Folders
  • This operation has been cancelled due to restrictions
  • Change Outlook's Programmatic Access Options
  • Use Public Folders In new Outlook
  • Adjusting Outlook's Zoom Setting in Email
  • Removing Suggested Accounts in New Outlook
  • Sync Issues and Errors with Gmail and Yahoo accounts
  • Error Opening iCloud Appointments in Classic Outlook
  • Opt out of Microsoft 365 Companion Apps
  • Mail Templates in Outlook for Windows (and Web)
  • Urban legend: Microsoft Deletes Old Outlook.com Messages
  • Buttons in the New Message Notifications
  • Move Deleted Items to Another Folder Automatically
  • Open Outlook Templates using PowerShell
  • Count and List Folders in Classic Outlook
  • Google Workspace and Outlook with POP Mail
Ajax spinner

Recent Bugs List

Microsoft keeps a running list of issues affecting recently released updates at Fixes or workarounds for recent issues in classic Outlook (Windows).

For new Outlook for Windows: Fixes or workarounds for recent issues in new Outlook for Windows .

Outlook for Mac Recent issues: Fixes or workarounds for recent issues in Outlook for Mac

Outlook.com Recent issues: Fixes or workarounds for recent issues on Outlook.com

Office Update History

Update history for supported Office versions is at Update history for Office

Outlook Suggestions and Feedback

Outlook Feedback covers Outlook as an email client, including Outlook Android, iOS, Mac, and Windows clients, as well as the browser extension (PWA) and Outlook on the web.

Outlook (new) Feedback. Use this for feedback and suggestions for Outlook (new).

Use Outlook.com Feedback for suggestions or feedback about Outlook.com accounts.

Other Microsoft 365 applications and services




New Outlook Articles

Sync Issues and Errors with Gmail and Yahoo accounts

Error Opening iCloud Appointments in Classic Outlook

Opt out of Microsoft 365 Companion Apps

Mail Templates in Outlook for Windows (and Web)

Urban legend: Microsoft Deletes Old Outlook.com Messages

Buttons in the New Message Notifications

Move Deleted Items to Another Folder Automatically

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Google Workspace and Outlook with POP Mail

Newest Code Samples

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Insert Word Document into Email using VBA

Warn Before Deleting a Contact

Use PowerShell to Delete Attachments

Remove RE:, FWD:, and Other Prefixes from Subject Line

Change the Mailing Address Using PowerShell

Categorize @Mentioned Messages

Send an Email When You Open Outlook

Delete Old Calendar Events using VBA

VBA Basics

How to use the VBA Editor

Work with open item or selected item

Working with All Items in a Folder or Selected Items

VBA and non-default Outlook Folders

Backup and save your Outlook VBA macros

Get text using Left, Right, Mid, Len, InStr

Using Arrays in Outlook macros

Use RegEx to extract message text

Paste clipboard contents

Windows Folder Picker

Custom Forms

Designing Microsoft Outlook Forms

Set a custom form as default

Developer Resources

Developer Resources

Developer Tools

VBOffice.net samples

SlovakTech.com

Outlook MVP David Lee

Repair PST

Convert an OST to PST

Repair damaged PST file

Repair large PST File

Remove password from PST

Merge Two Data Files

Sync & Share Outlook Data

  • Share Calendar & Contacts
  • Synchronize two computers
  • Sync Calendar and Contacts Using Outlook.com
  • Sync Outlook & Android Devices
  • Sync Google Calendar with Outlook
  • Access Folders in Other Users Mailboxes

Diane Poremsky [Outlook MVP]

Make a donation

Mail Tools

Sending and Retrieval Tools

Mass Mail Tools

Compose Tools

Duplicate Remover Tools

Mail Tools for Outlook

Online Services

Calendar Tools

Schedule Management

Calendar Printing Tools

Calendar Reminder Tools

Calendar Dates & Data

Time and Billing Tools

Meeting Productivity Tools

Duplicate Remover Tools

Productivity

Productivity Tools

Automatic Message Processing Tools

Special Function Automatic Processing Tools

Housekeeping and Message Management

Task Tools

Project and Business Management Tools

Choosing the Folder to Save a Sent Message In

Run Rules on messages after reading

Help & Suggestions

Submit Outlook Feature Requests

Slipstick Support Services

Buy Microsoft 365 Office Software and Services

Visit Slipstick Forums.

What's New at Slipstick.com

Home | Outlook User | Exchange Administrator | Office 365 | Outlook.com | Outlook Developer
Outlook for Mac | Common Problems | Utilities & Addins | Tutorials
Outlook & iCloud Issues | Outlook Apps
EMO Archives | About Slipstick | Slipstick Forums
Submit New or Updated Outlook and Exchange Server Utilities

Send comments using our Feedback page
Copyright © 2026 Slipstick Systems. All rights reserved.
Slipstick Systems is not affiliated with Microsoft Corporation.