Outlook – How to automatically decline or accept meeting requests from a specific sender in Outlook

calendarmicrosoft-outlookmicrosoft-outlook-2013

Is there a way to automatically decline or accept meeting requests from a specific sender in Outlook?

I know I can create a rule to move messages containing meeting requests from a certain sender to a certain folder, or delete them, but the requested meeting still shows up on my calendar. I'd like to automatically decline requests from certain people so they don't show up on my calendar.

In Options > Calendar, I see "Auto Accept/Decline" options, but it looks like these apply to all requests, not just requests from a specific sender.

I'm using Outlook 2013, part of MS Office Professional Plus 2013.

I've seen other questions here on this topic, but the answers haven't addressed my concern that the requested meeting still shows up on my calendar. And I can't comment on those questions because I don't have enough reputation yet.

Best Answer

Declining can be done via a delete rule, by specifying in the "Select condition(s)" dialog the option "which is a meeting invitation or update".

For a detailed tutorial with screenshots on declining with an answer template, see the article How to automatically decline meeting invites from specific people in Outlook?.

The problem is actually with accepting, which cannot be done using a rule. This needs VBA programming (ouch!), to be done as follows:

  • Press the keys Alt+F11 to open the Microsoft Visual Basic for Applications window

  • In the Microsoft Visual Basic for Applications window, in the left pane, double-click ThisOutlookSession to open the Code window, and then copy the following VBA code into the window. This script will also set the reminder period, but if you don't want that then delete the part starting with With xAppointmentItem and up to End With. Replace "Sender Name" within the quotes and/or add more conditions to its IF command.

Public WithEvents GItems As Outlook.Items
Private Sub Application_Startup()
    Set GItems = Outlook.Application.Session.GetDefaultFolder(olFolderInbox).Items
End Sub
Private Sub GItems_ItemAdd(ByVal Item As Object)
Dim xMtRequest As MeetingItem
Dim xAppointmentItem As AppointmentItem
Dim xMtResponse As MeetingItem
If Item.Class = olMeetingRequest Then
    Set xMtRequest = Item
    Set xAppointmentItem = xMtRequest.GetAssociatedAppointment(True)
    If xAppointmentItem.GetOrganizer.Name = "Sender Name" Then
        With xAppointmentItem
            .ReminderMinutesBeforeStart = 45
            .Categories = "Orange Category"
            .Save
        End With
        Set xMtResponse = xAppointmentItem.Respond(olMeetingAccepted, True)
        xMtResponse.Send
        xMtRequest.Delete
    End If
End If
End Sub
  • Save the code

  • Press Alt+Q to close Microsoft Visual Basic

  • Restart Outlook.

This same VBA macro can be used for declining, by replacing olMeetingAccepted with olMeetingDeclined.

Related Question