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 Apr 16, 2012

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.
Is there a way to extend this and decline for meetings scheduled from say 10pm to 6am?
There might be, but I can’t think of a way offhand – I’ll ask my dev expert friends. If its a problem, we recommend creating busy appointments for the off-time so people won’t try to schedule that period. If the problem is with working in a different time zone and people forget that, use it in the subject, something like “I’m in Eastern TZ and work 9AM-5PM”
I got a problem with sending, which is the last step. Basically I get the window of the decline message but it is not being sent automatically, I need to click on the “Send” button.
Does anybody know how to fix this ?
Try changing .Display in the last line to .Save. (.Display is great when you need to verify it is working.)
Is there any chance to make the calender items “private” right with auto-acceptance?
possibly… you need to set the sensitivity… I have not tested this (and won’t have time until this afternoon) – but something like this might work:
Set oAppt = oRequest.GetAssociatedAppointment(True)
Set oAppt.Sensitivity = olPrivate
it is gr8 help for me. tks.
is there any micro which declines meeting request
outlooke should accept 4 meeting request of starting at same time.but should decline if 5th meeting for same time. it is for shared calendar where multiple people works on same calendar.
excited ! gr8 wrk yar :)
In my case i am trying to make one of my meeting room as a user .
So when a request is sent to a user(meeting room) it should get auto accepted and a confirmation mail sould be sent depending uppon the availability . If its not available meaning the user (the meeting room) is blocked by some other user for that particular time, it should show a not available or the next available slots .
Guys can some one of u help me ?
Thanks for the quick reply. The “private setting” via
Set oAppt.Sensitivity = olPrivate
didn’t work. Any idea on how to fix it?
It works but it needs to be saved, oh and you don’t need Set.
Dim oAppt As AppointmentItem
Set oAppt = oRequest.GetAssociatedAppointment(True)
oAppt.Sensitivity = olPrivate
Dim oResponse
Set oResponse = oAppt.Respond(olMeetingAccepted, True)
oResponse.Display
oAppt.Save
Excellent! Thanks so much for this.
However, I do have one question on a modification: I’m trying to auto-accept all-day event invitations, not meeting requests (it’s how my company handles employee late/out/leaving early notifications). I’m fairly sure Outlook treats meetings and all-day events as different forms (creating a new meeting creates “Untitled – Meeting,” where creating a new all-day event creates “Untitled – Event”), and the set-up you described doesn’t work on these event invitations. I checked out the available forms, but couldn’t find anything that sounded like the all-day event invitation form. Do you have any insight on how I can solve this problem? Thanks again!
I think they use the same form – test it by inviting yourself to an all day event then check the message class in the inbox – turn off the reading pane to drop to a one line view then right click on the row of field names and choose Field Chooser. Under one of the All [forms] lists, find meeting class and drag it to the row of field names.
When I use the “Save with no response sent,” It automatically saves the message response to my drafts folder. What can I do to fix this?
Thanks, this was super useful
Diane,
I followed the steps above but am apparently missing something in the process. When I go set up my rule and choose ‘uses the form name form’ I have no forms to choose from. I am running Outlook 2007 with Exchange 2003.
Technically, you don’t need that condition as the code checks for meetings too:
If oRequest.MessageClass <> “IPM.Schedule.Meeting.Request” Then
Exit Sub
End If
I use it so the rule doesn’t run on every message.
But I believe you are looking at Personal forms in the left dropdown. Choose Application forms.
Screenshot
There are no forms to choose from on either option (Personal forms or Application forms) Is there something special I need to do when saving the script?
No, nothing special you need to do – those are outlook’s standard forms so you should see them. Are you using Outlook in online mode to your exchange server? That might be a factor.
As I mentioned earlier, you don’t really need that condition anyway…
Exchange Server.
Office 2010/32 bit
One of the Director’s here wants to Auto-Decline Meeting invitations from specific users. I know how to set up this type of rule, but need your script. I would like the meeting to be automatically declined, and then I will set the rule up to send an automatic reply to the user. Will the script you have posted (I’ve changed it to “DECLINE”) work? I am going to test it now, but here’s my code:
Sub AutoDeclineMeetings(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(olMeetingDeclined, True)
oResponse.Display
End Sub
I would like to add a generic text response to the sender via the code. Can you help?
Yes, it should work. If you need to send a generic autoreply, you add a few more lines to this script and have the one script do it all.
This is untested and may need (will probably need) tweaked to work – but you can add something like this to the code to autoreply to the meeting organizer.
Dim oMsg As MailItem
Set oMsg = Application.CreateItem(olMailItem)
oMsg.To = oRequest.organizer ‘need the correct field name
oMsg.Subject = “Sorry, I must decline ” & oRequest.Subject
oMsg.Body = “reply text goes here”
oMsg.Send
It’s not working. Sorry for the multiple posts but it will not allow me to EDIT my original post. Thanks!
This all worked for me. Thanks so much for the notes.
However, I want to be able to display the calendar on a wide screen for general information. Although the appointments are “accepted,” placed on the calendar and no response is sent — which is exactly what I wanted it to do — the appointments stay in the lighter color and are hard to read. Does anyone know how to change the appearance of an appointment without having to go to each one and formally accept? I just need them to be easier to read.
Thanks!
This is the only calendar in your view? Once accepted, they should look like any other meeting or appointment. However, if you have two calendars overlaid, the appointments on the “bottom” calendar are lighter.
I changed the following:
oResponse.Display to oResponse.Send
Otherwise the Accepted reply was not being sent.
This is awesome! Just one question, what do I do if I want to accept the meeting request, but want the time to appear as free on my calendar?
You need to set the busystatus and save it –
oAppt.BusyStatus = olFree
oAppt.Save