Thoughts from the clay guru.

Creating Outlook Meetings that end early.

Here are the instructions to create a macro that will allow you create Outlook 2010 meetings that are scheduled to end 15 minutes shorter than the selected time.

First, we need to enable the Outlook Developer toolbar:

  • In Outlook, select the File | Options menu
  • Select “Customize Ribbon”
  • Then on the right, check the Developer option under Main Tabs
  • Click on the “OK” button to close the Outlook Options window.
You should now see a Developer tab item appear at the top of Outlook.
  • Select the Developer tab
  • Select Macros | Macros menu item in the ribbon bar.
  • In the resulting dialog, enter “CreateCustomApp” in the Macro Name: field
  • Click on the Create button
  • Copy and paste the following code into the Microsoft Visual Basic for Application (MS VBA) window that appears, overwriting the existing empty Sub CreateCustomAppt() code that is there
    Sub CreateCustomAppt()
     Const minShort = 15
     Dim objOL 'As Outlook.Application
     Dim objAppt 'As Outlook.AppointmentItem
     Dim oView As Outlook.View
     Dim oExpl As Outlook.Explorer
     Dim oFolder As Outlook.Folder
     Dim oCalView As Outlook.CalendarView
     Const olAppointmentItem = 1
     Const olMeeting = 1
     Set objOL = CreateObject("Outlook.Application")
     Set objAppt = objOL.CreateItem(olAppointmentItem)
     Set oExpl = Application.ActiveExplorer
     Set oFolder = Application.ActiveExplorer.CurrentFolder
     Set oView = oExpl.CurrentView
     ' Check whether the active explorer is displaying a calendar view.
     If oView.ViewType = olCalendarView Then
     Set oCalView = oExpl.CurrentView
     With objAppt
     .Subject = "<Placeholder>"
     .Start = oCalView.SelectedStartTime
     '.Duration = 55
     .End = DateAdd("n", -minShort, oCalView.SelectedEndTime)
     .ReminderMinutesBeforeStart = 15
     .ReminderSet = True
     End With
     End If
     Set objAppt = Nothing
     Set objOL = Nothing
    End Sub
  • Save and close down the MS VBA window.
Now we are going to create a custom ribbon bar icon for this macro.
  • Select File | Options menu from Outlook again
  • Select the Customize Ribbon
  • From the “choose commands from:” dropdown on the left side of the window, select “Macros” (you should see your CreateCustomApp macro there)
  • On the right, the Customize the Ribbon should have “Main Tabs” already selected
  • Highlight the “Home (Calendar)” item below the Main Tabs title
  • Click on New Group ( a “New Group (Custom)” is created)
  • Click on Rename… button.
  •  Let’s rename it to Custom and select any symbol you want.
  • Click on the “OK” button to save your changes.

You should see the name change, and your Custom tab highlighted on the right list of tabs.  We are now going to add the Macro we just created to our Custom Tab group.

  • Click on the CreateCustomAppt macro listed on the left of the Outlook Options window to select it.
  • Click on the “Add>>” button in the middle.  This will add the a button for the macro in the selected (in this case our “Custom”) tab
  • Click on the “Rename…” button.
  • Name the button “Custom Appointment” and select an icon you like.
  • Click on the “OK” button  to save  and close the Rename window.
  • Click on the “OK” button to close the Outlook Options window
  • Select the “Home” tab at the top of the Outlook application, and you should see your Custom Appointment icon in the ribbon bar.

Now to use the macro, find a date & time where you want to create your appointment.  Select the range, let’s say “tomorrow from 4pm – 5pm”.  Now click the Custom Appointment button in the ribbon bar, and an appointment dialog will appear with a meeting created that is 15 minutes shorter than the selected time.

That’s it.  If you want sometime other than 15 minutes less, then you can change the following line in the macro:

Const minShort = 15

to the number of minutes you want to “shorten” the meeting by.


Single Post Navigation

2 thoughts on “Creating Outlook Meetings that end early.

  1. Hey Gumby,

    Thanks for your macro. I followed your instructions to implement it, however when I click on the run button, I receive the following error.

    “Run-time error ‘438’ : Object doesn’t support this property or method”

    When I click debug, the error appears to be at line:

    “.Start = oCalView.SelectedStartTime”

    I am using MS Office 2007. Are there any differences to how the code should be implemented? Any assistance would be appreciated.


  2. I am guessing that the SelectedStartTime attribute is not supported in Outlook 2007. Unfortunately, I only have access to Outlook 2010 and 2013 beta builds, so I cannot find an alternative attribute.

    Anyone out there have a suggestions?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: