It is vacation time. You are looking forward to some days off , and therefore want to cancel appointments in Outlook that either you scheduled or accepted.
This takes time even if you are quick with keyboards, because for each appointment you need some mouse clicks and to enter the cancellation message.
Remedy is brought by a VBA script, taking over this tedious task.
Since for each week there are one or two dozens of meetings or more, ththis script has been saving me a lot of time, effort and errors for a long time.
This post is available in German, too: Urlaubszeit ‒ viele Termine in Outlook schneller absagen
Steps for cancelling Outlook appointments
Have a look at the following video to remember what you have to do for each appointment in order to properly cancel it. Also remember that these steps, explained below the video, will apply to every meeting you want to get rid of.
If you want to cancel multiple appointments in Outlook, you usually have to perform the following steps manually for each appointment:
- In your calendar you select all meetings that you want to cancel, regardless whether you are the one who has invited, or are just participant.
- Then you start removal by pressing the delete key, triggering a whirlwind of windows.
- For all own appointments Outlook opens the calendar item. Here you enter a message for cancelling and click “Send”. For each meeting this makes at least three clicks and four key strokes. If you are good.
- For all accepted appointments Outlook asks if you want to cancel with a message to the organizer. Being nice to your colleagues you click yes and fill the message window.
This takes at least four clicks and four keystrokes for each appointment. If you are well practiced. Twenty times twenty appointments will keep you busy for quite some time, and probably on your last working day before going on vacation, when more work is already piling up anyway, because you still want to get a lot done before you leave. Of course, the same also applies before business trips; any absence entails not only the administration of the same, but also the reorganization of work, and due to the “normal” work, which does not simply disappear, also the desire or the need to get a lot of things done. It was precisely this experience that gave rise to my desire to no longer have to do all this manually, regardless of whether I’m on vacation or on a business trip, and regardless of whether I only cancel the appointments on the last day before the absence or a few days earlier, as is actually the case.
Easier with Automation
The entire process can also be simplified, at least on the scheduling side, by using the computer’s ability to do things automatically. Just see in the following video how the automation eases my process of cancelling appointments–both with me as owner or me as attendee–before I am on the run.
Most often you want to send the same cancel message to all and just cancel this recurring item, not the whole series. That means there is nothing to decide for each appointment, and nothing to re-phrase, but you still need to click fresh and copy & paste.
For this, computer science gave us scripting languages. In my concrete case my Visual Basic script is called BulkDeleteAppointments.bas. This takes on the task for you.
- In Outlook you select either a date range in the calendar view or multiple calendar items.
- You have just internal meetings in the date range of question that should all receive the same message? Then select the date range.
- You want to cancel multiple meetings with the same message, but retain others? Then select multiple calendar items using the Ctrl or Shift key.
- With Alt-F8 you open the Macro dialog and choose the macro BulkDeleteAppointments. It asks you for the message to send, then creates the cancellation notes and deletes the appointments. Finished.
Be careful, because the script does not ask for confirmation.
If you do not trust the script or me, then first set Outlook into offline mode and only then execute BulkDeleteAppointments.
The script may sometimes produce an error that is due to some appointment properties that have not yet been taken into account. Thanks to several updates in recent years, this should no longer be the case, but I cannot completely guarantee that it will not occur. In this case, please select the remaining dates and run the script again.
It is also clear that before I run the script on all possible dates, I consider whether any appointments require special treatment, i.e. an individual cancelation text, and cancel them manually as I did before. Or I run the script several times and write a different cancellation text in the query dialog box each time. After all, automation is supposed to make working life more professional, not more sloppy!
Setup
To be able to use the script, you must integrate it into your Outlook. To do this, first import it into the macro editor and then sign it digitally so that Outlook considers it secure enough. If you do not understand anything when reading the following list, then a script in Outlook may not be for you yet. That’s not a bad thing, but any scripting solution is more suitable for tech-savvy people who aren’t worried about breaking something at every step.
- Download BulkDeleteAppointments.bas.
- In Outlook open the Macro editor with keys Alt-F11.
- In menu File select Import File.
- Select the downloaded script BulkDeleteAppointments.bas.
- Create a new digital signature by running C:\Program Files\Microsoft Office\root\Office16\selfcert.EXE. Instead of Office16 the folder could have a different name in your system. Enter a name for your certificate and confirm.
- Sign in the macro editor by clicking menu Tools, Digital Signature… and there select your newly created certificate.
Done.
You can also view the script on Github and adapt it yourself; there are notes on this further down in this article.
Errors and their correction
I would like to share two common error messages with you:
- Error message “Statement too complex”: You have not downloaded the source code file, but saved the entire website. Proceed exactly as described in the “Setup” section.
- Error message “The macros in this project are deactivated. For information on activating the macros, please refer to the online help or the documentation of the host application.”: Exactly this. Saving can help, and again follow the instructions above exactly.
If you encounter a different error message, read and follow the setup instructions above again. If it still doesn’t work, consult a search engine of your choice with the exact error message. This will usually give you a pretty solid list of potential remedies to your specific problem, as almost no other problem is inherent to this script, but associated with specific settings or properties of your computer or Windows environment.
General note on VBA scripts
Why am I not offering this as a ready-to-use plugin for Outlook? Because this would require me to do a lot more testing and verification, and I would have to constantly maintain signatures and integration with all possible Outlook versions. It’s easier for me this way.
But this also means that you download a VisualBasic script from the Internet and add it to your Outlook, giving it access to your entire calendar. Depending on the IT environment, this may or may not be permitted, it may not really be desired or it may actually be prohibited, regardless of whether it is prevented by measures or just by some IT policy. If you want to know exactly, then first look internally on your intranet. Your IT department may find the vacation script so useful that they adopt and integrate it centrally, in which case you have nothing to do with the installation locally.
And then there is still the residual risk that the function does not work as intended. Of course I’ve been testing it for years, but always just on the version of Outlook that I’m currently using. I’ve been using Microsoft 365 professionally for some time now and therefore always have the latest version of Outlook, but of course in exactly the implementation in the company environment in which we are working. Whether in individual cases the properties of the environment can be so different that the script does not run for you, I cannot assess exactly from here. The individual steps of the function are relatively simple, you will not find any complex programming interfaces to be operated, no special requirements, no complicated algorithms, the procedure is fairly simple and straightforward. So if you have ever used a programming language or at least have no reservations about it, then you will have no problem understanding what is going on in the code and where.
I have been using this programming language, automation, Outlook for several decades now, and yet this script represents just that: a script. Something that I wrote for myself, and chose to make it available to you, so you can benefit from it, too.
If at any point something does not work as intended, you can fix or improve it, as some users of this script have already done. Use the corresponding function of Github, i.e. download the source code with Git, work on the program code, and then create a so-called pull request, i.e. a suggestion directly via Github, which I then receive and can incorporate into the main branch of the program after checking. This works perfectly and doesn’t bite. You’ll just need a Github account and ideally a Git client for your computer.
What do you automate?
This script you can see on Github as well as modify.
So what else do you automate in Outlook?
If you like the script, or if you have further concrete ideas, then please comment and sign up for my free newsletter. With this, you never miss out on news about my productivity tips.
Photo: Joachim Schlosser, License Creative Commons Attribution Share-Alike.
Leave a Reply