• 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

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.

Subscribe
Notify of
12 Comments
newest
oldest most voted
Inline Feedbacks
View all comments

Bence S (@guest_213467)
June 18, 2019 4:43 am
#213467

Hallo,

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

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Bence S
June 18, 2019 7:30 am
#213468

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.

0
0
Reply
Bence S (@guest_213197)
May 1, 2019 9:11 am
#213197

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

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Bence S
May 1, 2019 9:56 am
#213198

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

1
0
Reply
Bence S (@guest_213461)
Reply to  Diane Poremsky
June 17, 2019 10:06 am
#213461

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?

0
0
Reply
kimber P (@guest_195937)
January 13, 2016 11:37 am
#195937

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?

0
0
Reply
Tammy Barbara (@guest_189129)
February 8, 2015 9:16 am
#189129

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

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Tammy Barbara
February 8, 2015 11:47 am
#189135

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.

0
0
Reply
Obi (@guest_188954)
January 30, 2015 7:27 am
#188954

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")

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Obi
January 30, 2015 8:45 am
#188957

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?

0
0
Reply
Ryan (@guest_183172)
April 28, 2014 7:36 pm
#183172

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?

0
0
Reply
Diane Poremsky (@guest_183251)
Reply to  Ryan
May 2, 2014 9:38 pm
#183251

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.

0
0
Reply

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

Latest EMO: Vol. 30 Issue 15

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
  • Disable "Always ask before opening" Dialog
  • Adjusting Outlook's Zoom Setting in Email
  • This operation has been cancelled due to restrictions
  • Remove a password from an Outlook *.pst File
  • Reset the New Outlook Profile
  • Maximum number of Exchange accounts in an Outlook profile
  • Save Attachments to the Hard Drive
  • How to Hide or Delete Outlook's Default Folders
  • Google Workspace and Outlook with POP Mail
  • Import EML Files into New Outlook
  • Opening PST files in New Outlook
  • New Outlook: Show To, CC, BCC in Replies
  • Insert Word Document into Email using VBA
  • Delete Empty Folders using PowerShell
  • Warn Before Deleting a Contact
  • Classic Outlook is NOT Going Away in 2026
  • Use PowerShell to Delete Attachments
  • Remove RE:, FWD:, and Other Prefixes from Subject Line
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

Google Workspace and Outlook with POP Mail

Import EML Files into New Outlook

Opening PST files in New Outlook

New Outlook: Show To, CC, BCC in Replies

Insert Word Document into Email using VBA

Delete Empty Folders using PowerShell

Warn Before Deleting a Contact

Classic Outlook is NOT Going Away in 2026

Use PowerShell to Delete Attachments

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

Newest Code Samples

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

Use PowerShell or VBA to get Outlook folder creation date

Rename Outlook Attachments

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 © 2025 Slipstick Systems. All rights reserved.
Slipstick Systems is not affiliated with Microsoft Corporation.

wpDiscuz

Sign up for Exchange Messaging Outlook

Our weekly Outlook & Exchange newsletter (bi-weekly during the summer)






Please note: If you subscribed to Exchange Messaging Outlook before August 2019, please re-subscribe.

Never see this message again.

You are going to send email to

Move Comment