Tip o’ the Week #196 – Change Outlook meeting duration
It’s seemingly an irrefutable law that when you book a meeting for an hour, it takes an hour. Or what might happen is some people are still rocking up at 3 or 4 minutes after the start, and others start packing up 5 minutes before the end because they have another meeting to go to. Others yet will start a whole new discussion (“oh, just one more thing…”) with 2 minutes to go.
One comedian even made a fortune trying to teach us how to make meetings work. Here’s one video that’s 20 years old – yet still holds entirely true today. It was updated last year, and the original version is almost 40 years old. Clearly we don’t learn.
Now this week’s tip has been a long time coming – since the very beginning of Tip o’ the Week, approaching 3 years ago on this blog (and a year before that internally at Microsoft), it’s something that has been in the back of mind as a productivity tip. Thanks to discovering a blog post that provided suitable inspiration for the idea, and for the majority of the code, here it finally is. Praise be! Huzzah! Etc.
Frustratingly, Outlook has never offered the option to set how long a new meeting should be, or what time it should start. There are a few workarounds – you can set the timescale the calendar shows (so each line is 60, 30, 15 etc minutes, and if you double click on a section of your calendar to create an appointment, then it is set to that time slice) . Try it out by going into Calendar, selecting the View tab, then View Settings. Select Other Settings on the pop up dialog, and change the view from there.
What we need is a Macro
Today’s tip will let you set both the default duration and the start time of new appointments – so if you want to make all meetings 20 minutes long, starting 5 minutes past the hour or half hour, then you simply set it up as such when you install the code. Don’t be afraid – there is code involved here, but it’s fairly straightforward.
Here it is, step by step:
- Start Outlook. Well, duh – you already have…
- Press ALT-F11 to open the Visual Basic editor
- Expand out the tree at the top left, then double-click on the ThisOutlookSession line, which opens a code window to the right.
- Paste the following into the code window on the right:
Private objMeeting As clsMeeting
Private Sub Application_Quit()
Set objMeeting = Nothing
End SubPrivate Sub Application_Startup()
Set objMeeting = New clsMeeting
End Sub
Next, right-click on ThisOutlookSession on the left hand pane, and choose Insert then Class Module.
- Click on the newly-created Class1 and in the Properties section immediately beneath, select (Name) and rename Class1 to clsMeeting.
- Now double-click on the new clsMeeting, and you’ll see a code window appear on the right – copy and paste the following code into that window:
Const DEFAULT_LENGTH = 45
Const START_OFFSET = 5Private WithEvents olkIns As Outlook.Inspectors, _
WithEvents olkApt As Outlook.AppointmentItemPrivate Sub Class_Initialize()
Set olkIns = Application.Inspectors
End SubPrivate Sub Class_Terminate()
Set olkIns = Nothing
End SubPrivate Sub olkApt_PropertyChange(ByVal Name As String)
If Name = "AllDayEvent" Then
With olkApt
If .AllDayEvent = False Then
.Duration = DEFAULT_LENGTH
.Start = DateAdd("n", START_OFFSET, .Start)
End If
End With
End If
End SubPrivate Sub olkApt_Unload()
Set olkApt = Nothing
End SubPrivate Sub olkIns_NewInspector(ByVal Inspector As Inspector)
If Inspector.CurrentItem.Class = olAppointment Then
Set olkApt = Inspector.CurrentItem
With olkApt
If .CreationTime = #1/1/4501# Then
.Start = DateAdd("n", START_OFFSET, .Start)
.Duration = DEFAULT_LENGTH
End If
End With
End If
End Sub
OK, now you have your code imported. To change the defaults for meeting duration or offset time, simply change either or both of the Const values at the top of the code. You’ll need to restart Outlook for these changes to take effect.
There are a few steps to go through now:
- Click the floppy disk icon on the top left of the toolbar to save your changes, then close the Visual Basic for Applications window down.
- In Outlook 2013, go into File / Options / Trust Center, then click the Trust Center Settings button.
- Now, go into Macro Settings and change from the default of “Notifications for digitally signed macros, all other macros disabled” to “Notifications for all macros”
Now close Outlook entirely, and restart it – you’ll get a prompt to Enable Macros – this is unavoidable, sadly, but it will only happen when you first launch Outlook. Assuming you actually want this code to run, choose Enable Macros.
Now, what happens is whenever you create a new appointment, the Macro you’ve just installed will jump on it and set the start and duration times as appropriate. If you need to change the defaults, simply go back into the VB code as above, edit the values in clsMeeting, save the whole shebang and restart Outlook again. If you don’t want the code to run any more, go back into Trust Center and change the Macro settings back to the previous value.
Comments
- Anonymous
May 11, 2016
How do I remove this if I want to go back to the default?- Anonymous
May 21, 2016
Try just going back into the Visual Basic editor and remove the code you pasted in above...
- Anonymous
- Anonymous
July 25, 2016
This was awesome. Thanks. The code put me off but the instructions were quick and simple to follow. Now to test it out and customise the times as need be. It would be great to have two options ... a 20 minute option for (a 30 min time slot) and a your 'default' option of 45 minutes ... in a one hour slot. - Anonymous
August 10, 2016
This is great! I used it for Outlook 2016. Thanks so very much!!! - Anonymous
August 16, 2016
Is it possible to control this by GP? - Anonymous
August 19, 2016
Awesome! - Anonymous
September 01, 2016
This is fantastic! Thank you!I had another question on deployment options - is there a way I can automate this code and macro process? I want to do an entire office of 50 people but doing one by one like this may make it impractical.Any thoughts? - Anonymous
September 29, 2016
Amasing, thanks! :) - Anonymous
October 25, 2016
The comment has been removed- Anonymous
February 21, 2018
I'd be very interested in this solution as well!
- Anonymous
- Anonymous
October 29, 2016
Perfect! Thank you! This is just what I was looking for - far better than the workarounds you mention (which many other sites suggest). - Anonymous
November 02, 2016
Can we deploy this option to all users via Group policy or any other method ? - Anonymous
November 02, 2016
can we deploy this option via Globally - Anonymous
November 10, 2016
Hey, How do I use this w.o an offset? Say I want a meeting to start at 12 and end at 12:45? Right now they auto start at 12:05, thus still making Outlook very "clicky". - Anonymous
November 18, 2016
This seemed straightforward enough, but I am getting a compile error. "objMeeting As clsMeeting" is highlighted as "user-defined type not defined". I would appreciate advice on working around this in Outlook 2016. Thank you! - Anonymous
December 30, 2016
For anyone who needs justification for this common-sense idea, the classic is David Silverman's 2009 Harvard Business Review blog post, The 50-Minute Meeting. http://blogs.hbr.org/2009/08/the-50minute-meeting/ - Anonymous
January 19, 2017
I just tried this after a presentation to our senior staff on having more effective meetings. The instructions and the macro worked perfectly. Some of them have even made their own changes based on your instructions. Many thanks!! - Anonymous
February 20, 2017
Thanks a lot for the tips,It's a workaround indeed, but do Microsoft ever heard about UX DESIGN ?This very frustrating... - Anonymous
March 23, 2017
Awesome! Thank you! - Anonymous
March 29, 2017
I keep getting a compile error: User-defined type not defined. What did I do wrong? - Anonymous
April 13, 2017
Thanks for the start! I found this helpful to get me off the ground. My only issue with it was that if i highlighted a duration outside the default range (say 2 hours instead of an hour) - it would still set the duration to only an hour (the default). Fortunately, it's a relatively simple fix:Private Sub olkIns_NewInspector(ByVal Inspector As Inspector) If Inspector.CurrentItem.Class = olAppointment Then Set olkApt = Inspector.CurrentItem With olkApt If .CreationTime = #1/1/4501# Then .Start = DateAdd("n", START_OFFSET, .Start) .Duration = .Duration - START_OFFSET End If End With End IfEnd SubNote that this won't take effect until you restart outlook. - Anonymous
April 20, 2017
Incredible! Thank you so much for creating would should have been native functionality. - Anonymous
May 01, 2017
This is great. One additional feature i would like to add. I would like to see the duration when clicking the drop down for End time to match the default length. For example if i set my default length to 25 minutes i would like to see 25, 50, 75, 100, etc. as the options to choose in the drop down for end time. Thanks. - Anonymous
May 30, 2017
Does anyone know how to modify the code to Start 10 minutes later rather than end 10 minutes? As an example I am getting a start time of 12:00 and end of 12:50. I would prefer start time of 12:10 and end of 1:00. - Anonymous
August 02, 2017
Amazing! Thanks so much, that's going to change my life :) - Anonymous
November 08, 2017
Hi !This is just great! I have one little question about this macro.Now I used this code for set up 25 min appointments and it works properly. But, when I try to select (highlight) 2 sections for save a 50 min appointment it gives back again 25 mins duration. Of course If I change manually the end time it works. Could you please help me guys to change the code for this?Thank you in advance!