Wouldn’t it be handy if Outlook had a quick way to send a message to everyone invited to a meeting reminding them when the meeting starts and where it’s taking place at? Yes, Outlook meetings have built-in reminders, but you can’t be sure all the invitees set a reminder and even if they did an email nudge may do more to get them to the meeting than a reminder pop-up. Of course you could create a new message, copy and paste the list of invitees from the meeting item into the address line, write a note reminding them of the meeting, and send if off. I don’t know about you, but that sounds like a lot of work to me. I’d rather select an appointment on my calendar and click a button. Let the computer do the work.
Here’s a script that automates the process leaving you free to do something more important, or at least more interesting. Using the script is dead simple. Select or open a meeting on an Outlook calendar, it can be any calendar, and run the script. Off goes a reminder to all the participants who haven’t already declined your invitation (no point in sending them a reminder). It won’t send you a reminder either, unless you aren’t the organizer, and it won’t send reminders to resources (e.g. conference rooms). If you set the macro to run from a toolbar or QAT (Quick Action Toolbar), then the process only requires two clicks (one to select the appointment and another to send the reminder). Pretty simple, huh?
I wrote and tested this using Outlook 2007. I also tested it using Outlook 2010. It should work under any version of Outlook, but in fairness I haven’t tested it to make sure. You should test it to make sure it works the way you want it to before using it in a production environment.
Adding the Code to Outlook.
- Start Outlook
- Press ALT+F11 to open the Visual Basic Editor
- If not already expanded, expand Microsoft Office Outlook Objects
- If not already expanded, expand Modules
- Select an existing module (e.g. Module1) by double-clicking on it or create a new module by right-clicking Modules and selecting Insert > Module.
- Copy the code from the code snippet box and paste it into the right-hand pane of Outlook’s VB Editor window
- Edit the code as needed. I placed a comment where changes can occur.
- Click the diskette icon on the toolbar to save the changes
- Close the VB Editor
Sub SendMeetingReminder() 'On the next line change True to False if you want the reminder to send without giving you the chance to edit it. 'Leave it set to True if you want an opportunity to edit the message before sending it. Const EDIT_FIRST = True 'On the next line edit the message as desired. Both %START% and %LOCATION% are parameters that will be replaced 'with the meeting start time and location respectively before the message is displayed/sent. Const MSG_TEXT = "Just a quick reminder about this meeting.<br><br>Start: <b>%START%</b><br>Location: <b>%LOCATION%</b><br><br>" Const MACRO_NAME = "Send Meeting Reminder" Const ERR_MSG = "You must select an appointment for this macro to work." Dim olkApt As Object, _ olkRem As Outlook.MailItem, _ olkRec As Outlook.Recipient On Error Resume Next Select Case TypeName(Application.ActiveWindow) Case "Explorer" Set olkApt = Application.ActiveExplorer.Selection(1) Case "Inspector" Set olkApt = Application.ActiveInspector.CurrentItem End Select If TypeName(olkApt) <> "Nothing" Then If olkApt.Class = olAppointment Then Set olkRem = Application.CreateItem(olMailItem) With olkRem .Subject = "Meeting Reminder: " & olkApt.Subject .HTMLBody = MSG_TEXT & .HTMLBody .HTMLBody = Replace(.HTMLBody, "%START%", Format(olkApt.Start, "ddd, mmm d at h:mm AMPM")) .HTMLBody = Replace(.HTMLBody, "%LOCATION%", olkApt.Location) For Each olkRec In olkApt.Recipients If (olkRec.Type <> olResource) And (olkRec.Name <> Session.CurrentUser.Name) Then If Not olkRec.MeetingResponseStatus = olResponseDeclined Then olkRem.Recipients.Add olkRec.Name End If End If Next .Recipients.ResolveAll If EDIT_FIRST Then .Display Else .Send End If End With Else MsgBox ERR_MSG, vbCritical + vbOKOnly, MACRO_NAME End If Else MsgBox ERR_MSG, vbCritical + vbOKOnly, MACRO_NAME End If On Error GoTo 0 Set olkApt = Nothing Set olkRem = Nothing Set olkRec = Nothing End Sub
Using the Code.
- Select or open a meeting on any Outlook calendar
- Run the SendMeetingReminder macro to send a reminder
Running with a single click.
You can add toolbar buttons (Outlook 2003) or QAT buttons (Outlook 2007/2010) to run the macro with a single click. Here’s a link to a page that explaining how to do both.
Revisions.
- Revision 1
This revision is for Travis who asked if it would be possible to modify the solution to have the message sent “… when the reminder pops up and not when you initially set up the appointment”. Travis goes on to explain that Lotus Notes has the ability to set up future reminders, something he’d like to emulate in Outlook.
In order to provide that capability we have to modify the code to be triggered when the Reminder event of the Application object fires. The event passes the object, in this case an appointment item, the reminder belongs to. All we need to do is modify the original code to take a parameter, the appointment, instead of working against the open or selected item. I also modified the code so it will only work with meetings. I ddidn’t figure there’d be much interest in sending a reminder to yourself for regular appointments.
One note about this solution. A message will be sent each time the reminder fires for the meeting. In other words, if you snooze the reminder, then another message will be sent the second time the reminder fires.
Instructions.
Outlook 2003 and Earlier.
- Start Outlook
- Click Tools > Macro > Visual Basic Editor
- If not already expanded, expand Microsoft Office Outlook Objects and click on ThisOutlookSession
- Copy the code from the Code Snippet box and paste it into the right-hand pane of
- Outlook’s VB Editor window
- Edit the code as needed. I included comment lines wherever something needs to or can change
- Click the diskette icon on the toolbar to save the changes
- Close the VB Editor
- Click Tools > Macro > Security
- Set the Security Level to Medium
- Close Outlook
- Start Outlook
- Outlook will display a dialog-box warning that ThisOutlookSession contains macros and asking if you want to allow them to run. Say yes.
Outlook 2007.
- Start Outlook
- Click Tools > Macro > Visual Basic Editor
- If not already expanded, expand Microsoft Office Outlook Objects and click on ThisOutlookSession
- Copy the code from the Code Snippet box and paste it into the right-hand pane of Outlook’s VB Editor window
- Edit the code as needed. I included comment lines wherever something needs to or can change
- Click the diskette icon on the toolbar to save the changes
- Close the VB Editor
- Click Tools > Trust Center
- Click Macro Security
- Set Macro Security to “Warnings for all macros”
- Click OK
- Close Outlook
- Start Outlook. Outlook will display a dialog-box warning that ThisOutlookSession contains macros and asking if you want to allow them to run. Say yes.
Outlook 2010.
- Start Outlook
- Click Tools > Macro > Visual Basic Editor
- If not already expanded, expand Microsoft Office Outlook Objects and click on ThisOutlookSession
- Copy the code from the Code Snippet box and paste it into the right-hand pane of Outlook’s VB Editor window
- Edit the code as needed. I included comment lines wherever something needs to or can change
- Click the diskette icon on the toolbar to save the changes
- Close the VB Editor
- Click File and select Options
- When the Outlook Options dialog appears click Trust Center then click the Trust Center Settings button
- Click Macro Settings
- Select either of the two bottom settings (i.e. “Notifications for all macros” or “Enable all macros (not recommended; potentially dangerous code can run)”. The choice of which to chose is up to you. If you select “Notifications”, then you’ll be prompted at times to enable macros. If you pick “Enable all” then there’s a chance that a malicious macro could run. It’s a question of how much risk you want to assume.
- Click Ok until the dialog-boxes have all closed
- Close Outlook
- Start Outlook. Outlook will display a dialog-box warning that ThisOutlookSession contains macros and asking if you want to allow them to run. Say yes.
Private Sub Application_Reminder(ByVal Item As Object) If Item.Class = olAppointment Then SendMeetingReminder Item End If End Sub Sub SendMeetingReminder(olkApt As Outlook.AppointmentItem) 'On the next line change False to True if you want an opportunity to edit the message before it's sent. 'Leave it set to False if you want the message to be sent without any action on your part. Const EDIT_FIRST = False 'On the next line edit the message as desired. Both %START% and %LOCATION% are parameters that will be replaced 'with the meeting start time and location respectively before the message is displayed/sent. Const MSG_TEXT = "Just a quick reminder about this meeting.<br><br>Start: <b>%START%</b><br>Location: <b>%LOCATION%</b><br><br>" Const MACRO_NAME = "Send Meeting Reminder" Dim olkRem As Outlook.MailItem, _ olkRec As Outlook.Recipient If olkApt.MeetingStatus = olMeeting Then Set olkRem = Application.CreateItem(olMailItem) With olkRem .Subject = "Meeting Reminder: " & olkApt.Subject .HTMLBody = MSG_TEXT & .HTMLBody .HTMLBody = Replace(.HTMLBody, "%START%", Format(olkApt.Start, "ddd, mmm d at h:mm AMPM")) .HTMLBody = Replace(.HTMLBody, "%LOCATION%", olkApt.Location) For Each olkRec In olkApt.Recipients If (olkRec.Type <> olResource) And (olkRec.Name <> Session.CurrentUser.Name) Then If Not olkRec.MeetingResponseStatus = olResponseDeclined Then olkRem.Recipients.Add olkRec.Name End If End If Next .Recipients.ResolveAll If EDIT_FIRST Then .Display Else .Send End If End With End If Set olkRem = Nothing Set olkRec = Nothing End Sub
- Revision 2
I put this revision together for Tim. Part of Tim’s job involves scheduling appointments with students leading him to ask if I could modify the code to send a reminder to the student appointments alone. After some discussion Tim and I settled on using a category to differentiate the student appointments from other appointments on his calendar. Here’s how the solution works. Tim will create a new category called “Reminder”. When Tim creates a student appointment he will assign it to the “Reminder” category. He’s not limited to using the “Reminder” category with student appointments though. Tim can assign the category to any appointment. When a reminder fires the code runs. First it checks to make sure the item that triggered the reminder is an appointment. If it is, then it checks to see if the item belongs to the “Reminder” category. If it does, then the code sends a meeting reminder email. If the triggering item isn’t an appointment or if the appointment doesn’t belong to the “Reminder” category, then nothing happens.
Instructions.
Outlook 2003 and Earlier.
- Start Outlook
- Click Tools > Macro > Visual Basic Editor
- If not already expanded, expand Microsoft Office Outlook Objects and click on ThisOutlookSession
- Copy the code from the Code Snippet box and paste it into the right-hand pane of
- Outlook’s VB Editor window
- Edit the code as needed. I included comment lines wherever something needs to or can change
- Click the diskette icon on the toolbar to save the changes
- Close the VB Editor
- Click Tools > Macro > Security
- Set the Security Level to Medium
- Close Outlook
- Start Outlook
- Outlook will display a dialog-box warning that ThisOutlookSession contains macros and asking if you want to allow them to run. Say yes.
Outlook 2007.
- Start Outlook
- Click Tools > Macro > Visual Basic Editor
- If not already expanded, expand Microsoft Office Outlook Objects and click on ThisOutlookSession
- Copy the code from the Code Snippet box and paste it into the right-hand pane of Outlook’s VB Editor window
- Edit the code as needed. I included comment lines wherever something needs to or can change
- Click the diskette icon on the toolbar to save the changes
- Close the VB Editor
- Click Tools > Trust Center
- Click Macro Security
- Set Macro Security to “Warnings for all macros”
- Click OK
- Close Outlook
- Start Outlook. Outlook will display a dialog-box warning that ThisOutlookSession contains macros and asking if you want to allow them to run. Say yes.
Outlook 2010.
- Start Outlook
- Click Tools > Macro > Visual Basic Editor
- If not already expanded, expand Microsoft Office Outlook Objects and click on ThisOutlookSession
- Copy the code from the Code Snippet box and paste it into the right-hand pane of Outlook’s VB Editor window
- Edit the code as needed. I included comment lines wherever something needs to or can change
- Click the diskette icon on the toolbar to save the changes
- Close the VB Editor
- Click File and select Options
- When the Outlook Options dialog appears click Trust Center then click the Trust Center Settings button
- Click Macro Settings
- Select either of the two bottom settings (i.e. “Notifications for all macros” or “Enable all macros (not recommended; potentially dangerous code can run)”. The choice of which to chose is up to you. If you select “Notifications”, then you’ll be prompted at times to enable macros. If you pick “Enable all” then there’s a chance that a malicious macro could run. It’s a question of how much risk you want to assume.
- Click Ok until the dialog-boxes have all closed
- Close Outlook
- Start Outlook. Outlook will display a dialog-box warning that ThisOutlookSession contains macros and asking if you want to allow them to run. Say yes.
Dim WithEvents olkReminders As Outlook.Reminders Private Sub Application_Quit() Set olkReminders = Nothing End Sub Private Sub Application_Startup() Set olkReminders = Application.Reminders End Sub Private Sub olkReminders_ReminderFire(ByVal ReminderObject As Reminder) Dim olkApt As Outlook.AppointmentItem If ReminderObject.Item.Class = olAppointment Then Set olkApt = ReminderObject.Item If olkApt.MeetingStatus = olMeeting Then If InCategory(olkApt, "Reminder") Then ReminderObject.Dismiss SendMeetingReminder olkApt End If End If End If Set olkApt = Nothing End Sub Function InCategory(olkItm As Object, strCat As String) As Boolean Dim arrTmp As Variant, varCat As Variant arrTmp = Split(olkItm.Categories, ",") For Each varCat In arrTmp If varCat = strCat Then InCategory = True Exit For End If Next End Function Sub SendMeetingReminder(olkApt As Outlook.AppointmentItem) 'On the next line change True to False if you want the reminder to send without giving you the chance to edit it. 'Leave it set to True if you want an opportunity to edit the message before sending it. Const EDIT_FIRST = True 'On the next line edit the message as desired. Both %START% and %LOCATION% are parameters that will be replaced 'with the meeting start time and location respectively before the message is displayed/sent. Const MSG_TEXT = "Just a quick reminder about this meeting.<br><br>Start: <b>%START%</b><br>Location: <b>%LOCATION%</b><br><br>" Const MACRO_NAME = "Send Meeting Reminder" Dim olkRem As Outlook.MailItem, _ olkRec As Outlook.RECIPIENT On Error Resume Next Set olkRem = Application.CreateItem(olMailItem) With olkRem .Subject = "Meeting Reminder: " & olkApt.Subject .HTMLBody = MSG_TEXT & .HTMLBody .HTMLBody = Replace(.HTMLBody, "%START%", Format(olkApt.Start, "ddd, mmm d at h:mm AMPM")) .HTMLBody = Replace(.HTMLBody, "%LOCATION%", olkApt.Location) For Each olkRec In olkApt.Recipients If (olkRec.Type <> olResource) And (olkRec.Name <> Session.CurrentUser.Name) Then If Not olkRec.MeetingResponseStatus = olResponseDeclined Then olkRem.Recipients.Add olkRec.Name End If End If Next .Recipients.ResolveAll If EDIT_FIRST Then .Display Else .Send End If End With On Error GoTo 0 Set olkApt = Nothing Set olkRem = Nothing Set olkRec = Nothing End Sub
- Revision 3
I created this revision for Fred who asked me to modify rev 2 to use something other than a category as the triggering mechanism. In this version I’m using a user property that Fred will set to true if he wants to send a reminder or false if he doesn’t. Fred will add a button to either the ribbon or the quick action toolbar (QAT) that toggles the setting. Unfortunately, it’s not possible to create either of those via code, so Fred will have to create them manually. After the code I’ve included links to instructions on how to create those buttons. The button will call the ToggleReminder macro. Fred can follow the instructions from rev 2 to add the code to Outlook.
Const PRP_NAME = "ReminderMsg" Dim WithEvents olkReminders As Outlook.Reminders Private Sub Application_Quit() Set olkReminders = Nothing End Sub Private Sub Application_Startup() Set olkReminders = Application.Reminders End Sub Private Sub olkReminders_ReminderFire(ByVal ReminderObject As Reminder) Dim olkApt As Outlook.AppointmentItem If ReminderObject.Item.Class = olAppointment Then Set olkApt = ReminderObject.Item If olkApt.MeetingStatus = olMeeting Then If ReminderRequested(olkApt) Then ReminderObject.Dismiss SendMeetingReminder olkApt End If End If End If Set olkApt = Nothing End Sub Function ReminderRequested(olkMtg As Outlook.AppointmentItem) As Boolean Dim olkPrp As Outlook.UserProperty On Error Resume Next Set olkPrp = olkMtg.UserProperties.Item(PRP_NAME) On Error GoTo 0 If TypeName(olkPrp) <> "Nothing" Then ReminderRequested = olkPrp.Value End If Set olkPrp = Nothing End Function Sub SendMeetingReminder(olkApt As Outlook.AppointmentItem) 'On the next line change True to False if you want the reminder to send without giving you the chance to edit it. 'Leave it set to True if you want an opportunity to edit the message before sending it. Const EDIT_FIRST = True 'On the next line edit the message as desired. Both %START% and %LOCATION% are parameters that will be replaced 'with the meeting start time and location respectively before the message is displayed/sent. Const MSG_TEXT = "Just a quick reminder about this meeting.<br><br>Start: <b>%START%</b><br>Location: <b>%LOCATION%</b><br><br>" Const MACRO_NAME = "Send Meeting Reminder" Dim olkRem As Outlook.MailItem, _ olkRec As Outlook.RECIPIENT On Error Resume Next Set olkRem = Application.CreateItem(olMailItem) With olkRem .Subject = "Meeting Reminder: " & olkApt.Subject .HTMLBody = MSG_TEXT & .HTMLBody .HTMLBody = Replace(.HTMLBody, "%START%", Format(olkApt.Start, "ddd, mmm d at h:mm AMPM")) .HTMLBody = Replace(.HTMLBody, "%LOCATION%", olkApt.Location) For Each olkRec In olkApt.Recipients If (olkRec.Type <> olResource) And (olkRec.Name <> Session.CurrentUser.Name) Then If Not olkRec.MeetingResponseStatus = olResponseDeclined Then olkRem.Recipients.Add olkRec.Name End If End If Next .Recipients.ResolveAll If EDIT_FIRST Then .Display Else .Send End If End With On Error GoTo 0 Set olkApt = Nothing Set olkRem = Nothing Set olkRec = Nothing End Sub Sub ToggleReminder() Dim olkApt As Outlook.AppointmentItem, olkPrp As Outlook.UserProperty Select Case TypeName(Application.ActiveWindow) Case "Explorer" Set olkApt = Application.ActiveExplorer.Selection(1) Case "Inspector" Set olkApt = Application.ActiveInspector.CurrentItem End Select If TypeName(olkApt) <> "Nothing" Then If olkApt.Class = olAppointment Then On Error Resume Next Set olkPrp = olkApt.UserProperties.Item(PRP_NAME) On Error GoTo 0 If TypeName(olkPrp) = "Nothing" Then Set olkPrp = olkApt.UserProperties.Add(PRP_NAME, olYesNo) olkPrp.Value = True Else olkPrp.Value = Not olkPrp.Value End If olkApt.Save MsgBox "The reminder message setting for this appoint is now " & IIf(olkPrp.Value = True, "on", "off") & ".", vbInformation + vbOKOnly, "Toggle Reminder Message" End If End If Set olkApt = Nothing Set olkPrp = Nothing End Sub
Adding Buttons to Run the ToggleReminder Macro.
- Outlook 2007. Follow these instructions to add a toolbar button that runs the macro.
- Outlook 2010. Follow these instructions to add the macro to the QAT.
How do I leave out the Meeting requester from the emails? For example, I want to send an email requesting an agenda, but only to the invited parties and not to the meeting requester.
Hi, Jonathan.
I’m assuming that by “requester” you mean the meeting organizer. if so, then to avoid sending to the organizer change this line
to
Hello,
Will this script work in Office 365 too?
Hi, Shawn.
I don’t use Office 365, so I cant say for sure. That said, so long as you are using the PC version of Outlook, not the web-based version of Outlook, then the script should work.
David,
I cant re,ember if I already replied to you, so apologies if I duplicate information.
I can further modify it to use a signature or brand the message in some fashion. Do you have a signature already defined? – Yes, It’s called “Meeting Signature” this would be ideal if this could be beneath the reminder text?
I can also copy in the body of the original appointment, if that’s what you’d prefer. – what would be ideal is if the message read like this, “reminder” “original body text” then “Meeting Signature” so that if the original reminder text was blank it would still show the signature text.
I can also have the code attach a copy of the original appointment. That’d allow a recipient to add it to their calendar in case they didn’t have the original invite. – I don’t think this is necessary for my needs, if i wanted to add another person to the meeting i would do this via the calendar and not rely on reminder text.
I don’t suppose you would know if there are any additional settings to ,make this work consistently with an outlook exchange account? I’ve managed to test is a couple of times and it works and then sometimes it doesn’t. to note I am getting outlook on all the time and the computer doesn’t sleep.