Tip o’ the Week #196 – Change Outlook meeting duration


clip_image002It’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 clip_image004be, 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…
  • clip_image005Press 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 Sub

Private 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 = 5


Private WithEvents olkIns As Outlook.Inspectors, _
        WithEvents olkApt As Outlook.AppointmentItem


Private Sub Class_Initialize()
    Set olkIns = Application.Inspectors

End Sub


Private Sub Class_Terminate()
    Set olkIns = Nothing
End Sub


Private 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 Sub

Private Sub olkApt_Unload()
    Set olkApt = Nothing
End Sub

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 = 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:clip_image008

  • 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”

clip_image009

clip_image011

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 (23)

  1. rob says:

    How do I remove this if I want to go back to the default?

    1. EwanD says:

      Try just going back into the Visual Basic editor and remove the code you pasted in above…

  2. Amy Darragh says:

    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.

  3. Elizabeth says:

    This is great! I used it for Outlook 2016. Thanks so very much!!!

  4. JP says:

    Is it possible to control this by GP?

  5. Jeff says:

    Awesome!

  6. Cory says:

    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?

  7. Lina says:

    Amasing, thanks! 🙂

  8. Christian says:

    Hi Ewan,

    This is the best solution I have found yet, and it works as you intended – of course I suppose……;-)…….but what about the time “chunks” available, when clicking on the drop down box regarding end time, this is still defaulting to 30min. 1 hour 1.30h
    Now I would like to be able to configure this as well to: 0min, 20min, 50min, 1h20min, 1h50min, 2h20min, 2h50min, 3h20min, etc. up to 23h50min
    Can you suggest code to add this functionality?

    Kind Regards,
    Christian

  9. Dan says:

    Perfect! Thank you! This is just what I was looking for – far better than the workarounds you mention (which many other sites suggest).

  10. Kalees says:

    Can we deploy this option to all users via Group policy or any other method ?

  11. mkalees says:

    can we deploy this option via Globally

  12. Joe Phalan says:

    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”.

  13. SW says:

    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!

  14. Hilde Weisert says:

    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/

  15. Al says:

    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!!

  16. vincent megag says:

    Thanks a lot for the tips,
    It’s a workaround indeed, but do Microsoft ever heard about UX DESIGN ?
    This very frustrating…

  17. Amy says:

    Awesome! Thank you!

  18. Jessica says:

    I keep getting a compile error: User-defined type not defined. What did I do wrong?

  19. Chris says:

    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 If
    End Sub

    Note that this won’t take effect until you restart outlook.

  20. ltlrags says:

    Incredible! Thank you so much for creating would should have been native functionality.

  21. David Gagliardotto says:

    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.

  22. Matt says:

    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.

Skip to main content