Recently I signed up for an account at Quora. One of the first Outlook questions I encountered was this one from Thomas Foote. Thomas is looking for a way to send a message to just those meeting invitees that accepted the meeting request. I explained to Thomas that while Outlook does not have a built in means of doing this, it is possible to do it with a script (macro).
This macro is very simple. It creates a new message then opens the selected meeting/appointment and loops through the list of invitees. If an invitee is a person, not a resource, and if they accepted, then they are added to the To line of the message. The message is then displayed on screen.
Thomas has Outlook 2010, which I still haven’t loaded yet. I am therefore unable to provide him with a complete set of instructions for adding the code. The best I can do is provide instructions for Outlook 2007 and hope that he can adapt them to Outlook 2010 without too much trouble.
- Start Outlook
- Click Tools > Macro > 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 included comments wherever something needs to or can change
- Click the diskette icon on the toolbar to save the changes
- Close the VB Editor
Sub SendToAccepted() Dim olkApt As Object, olkMsg As Outlook.MailItem, olkRcp 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) <> "AppointmentItem" Then msgbox "The item you selected is not a meeting/appointment. Processing terminated.", vbCritical + vbOKOnly, "Send to Meeting Attendees" Else Set olkMsg = Application.CreateItem(olMailItem) With olkMsg .Subject = olkApt.Subject For Each olkRcp In olkApt.Recipients If olkRcp.MeetingResponseStatus = olResponseAccepted Then If olkRcp.Type <> olResource Then olkMsg.Recipients.Add olkRcp.Address End If End If Next End With olkMsg.Display End If Set olkApt = Nothing Set olkMsg = Nothing Set olkRcp = Nothing End Sub