An interesting problem came up in the Microsoft public newsgroups this week. Richard posts: “We have a specific user requirement to auto accept meeting requests only from some selected organizers, but I don’t see any choice in Rule Wizard for meeting requests. Does anyone have an idea, please?”
Of course I have an idea. Begin with a rule using the conditions “from people or distribution list” and “uses the specified form”, choosing the Meeting Request form under Application forms.

Since there is not an action to respond to meeting requests, you’ll need to use a script to accept it. Outlook MVP Michal Bednarz offers this script, which you need to add to ThisOutlookSession before creating the rule.
This was tested in Outlook 2007 and should work in any version which supports the Run a Script action.
The Code
Sub AutoAcceptMeetings(oRequest As MeetingItem) If oRequest.MessageClass <> "IPM.Schedule.Meeting.Request" Then Exit Sub End If Dim oAppt As AppointmentItem Set oAppt = oRequest.GetAssociatedAppointment(True) Dim oResponse Set oResponse = oAppt.Respond(olMeetingAccepted, True) oResponse.Display End Sub
How to use
Open Outlook’s VBA editor (Alt+F11), expand Microsoft Office Outlook Objects then double click on ThisOutlookSession. Type or paste the code into the module, then create the rule with the ‘run script’ Action and select this script
To decline a meeting, replace olMeetingAccepted with olMeetingDeclined:
Set oResponse = oAppt.Respond(olMeetingDeclined, True)
To Save with no response sent
To accept the meeting and add it to your calendar automatically, without sending a response, Christopher changed the last part of the code to:
Dim oResponse Set oResponse = oAppt.Respond(olMeetingAccepted, True) oResponse.Close (olSave) End Sub
To Delete from the Inbox once processed
Add the following before End Sub:
oRequest.Delete
Macro Security
Macro security needs to be set on Notify for all macros. Using Enable All macros is a poor choice as it is often reset to the signed macros only option by security software or updates. If you prefer, you can sign the macro using SelfCert and set security to Signed macros only. If you choose to use SelfCert, sign the macro after you are finished editing it as it will need to be re-signed after each edit.
To access macro security dialog, go to File, Options, Trust Center in Outlook 2010. Use Tools, Macros, Security menu in Outlook 2007 and older. When security is set to Notify, you will be asked if you want to run the macro each time you start Outlook.
Complete steps for using the VBA Editor and SelfCert are at How to use the VBA Editor
Articles that may interest you:
Last reviewed on Aug 18, 2011


Thank you so much for posting this code. I’m wondering if there is somethig similar for “not sending a response”. So, when I’ve added the rules you have above with the code, the meeting notice accepts, but it pops open a response email where I could type a response. I have to click send on that email for it to be added to my calendar. can that step be elimanted with a rule??
This doesn’t seem to work with Outlook 2010. Any suggestion?
It works here in 32-bit Outlook 2010. Do you get any error messages?
Change the last part of the code to:
Set oResponse = oAppt.Respond(olMeetingAccepted, True)
oResponse.Close (olSave)
And the appointment will be saved, no response will be sent.
I also added
oRequest.Delete
at the bottom to remove it from my inbox once processed.
This is Outlook 2010 32bit.
oRequest.Delete didn’t work for me so I just added “delete” to the rule.
It *worked* in 2010/32. After I rebooted, the script no longer seems to run? It’s there, it’s selectable from the rules wizard, but doesn’t appear to be executed. Added a breakpoint, and that never triggers.
Seems like scripts run from the rules have a tendency to wreak havoc with the VBAProject.OTM-file. Deleted it, and now the script runs fine.
That’s usually because of macro security. you need it set on medium (allow all to run, with warning)
Also had a problem – it worked once, then never again. Exchange 2003 with OL2010 on terminal server. I am looking for some app to do this now – hoping codetwo may do it.
What is your macro security set on?
I tried the setting to enable all macro, but it made no difference.
Same issue. Ended up running “selfcert.exe” which comes with the office package, create a certificate, and then choosing Tools – Digital signature in the VBA editor, choosing the newly created certificate as a signature. Upon restart, outlook asks if I want to trust it, I answer “trust all from…” and the macro has been running fine ever since.
I implemented the code above, along with the “Save with no response sent ” and “Delete from the Inbox once processed” portions. Unfortunately, when the script runs, I get a security popup (the one where I have to wait five seconds to click yes). I have signed the script using my CAC digital certificate and also set the macro security settings to medium. Anyone have any ideas?
I am running WINXP SP3 and Outlook 2003 SP3 in a WIN2003 domain environment with Exchange 2003 servers.
Forgot to add-
I also tried signing with a regular code signing certificate and that didn’t work.
I tried the code below and it seemed to break the auto accept code above.
——–
OlSecurityManager.DisableOOMWarnings = True
On Error Goto Finally
Sub AutoAcceptMeetings(oRequest As MeetingItem)
If oRequest.MessageClass “IPM.Schedule.Meeting.Request” Then
Exit Sub
End If
Dim oAppt As AppointmentItem
Set oAppt = oRequest.GetAssociatedAppointment(True)
Dim oResponse
Set oResponse = oAppt.Respond(olMeetingAccepted, True)
oResponse.Close (olSave)
End Sub
Finally:
OlSecurityManager.DisableOOMWarnings = False
——-
Is the cert set as a trusted cert? Or try using selfcert (and then trust yourself.)
The CAC cert is trusted through a CA and the code signing cert is a selfcert and then I trusted myself.
What if there is a meeting already scheduled for the same time of the new request? Is there any way of addressing a scheduling conflict?
Not within the script. You can do it if you have Outlook configured to not accept if a conflict but it will accept (or decline) everything – the rule won’t do you any good.
Is there a way to Send a response without having the invitation pop up when received? I want the organizer to be able to see who has accepted without the recipient having to type in a message. In other words, the equivalent of “Send the response now.” when accepting meetings… but automatic.
Thanks! :)
Christopher posted that you need to add oResponse.Close (olSave) before the End Sub to accept without sending a response.
I want the meeting organizer to be able to see who has accepted the invitation. Adding oResponse.Close (olSave) works perfectly but does not alow the organizer to see that it was accepted. So I do want a “response” to be sent to the meeting organizer in a sense… but I dont want the user to get a popup where they have to accept/enter a response manually.
Hmm. It should work – the response is received, but not processed. I’ll try and figure out why – I’m not sure if its my settings or the script. (None of my responses ae processing.)
is there a way to accept canceled meetings? delete the if they were canceled?
This is awesome… I just had ~140 meeting requests from the same person in my inbox to set up multiple monthly meetings for the whole year and this accepted and processed them w/in 45 seconds… saved me an hr! Thanks a lot!!! Very cool stuff.
A pop up shows up and I have to wait 5 seconds to be able to click Ok. I think David had the same issue, couldn’t identify any solution in the forum. Any ideas ?
Can you send me a screenshot? (to diane at slipstick ) This shouldn’t bring up the one dialog that brings up a delay. Also, which version of Outlook?
I was only able to open VB editor once (and was interrupted half way through), but now the ALT+F11 to open it no longer works. Any thoughts ?
Close Outlook and try renaming VbaProject.OTM file – in Windows 7, you can paste %appdata%\microsoft\outlook into the address bar of windows explorer to jump to it.