How to Auto Accept Specific Meeting Invitations and Update the Meeting Reminder with Outlook VBA

Many people desire that Outlook can auto accept specific meeting invitations, like invitations from specific organizers. Some users also hope that Outlook is able to auto update the reminder as per their own habits. This article will tell how to quickly accomplish it with Outlook VBA.

When you want to create a rule to auto accept specific meeting invitations, you’ll find that you can only set the conditions, such as meeting requests from specific people, but there is no action to accept them. It means that you cannot achieve it via Outlook rule. In addition, the meeting invitations may come with the preset reminder by the organizer. Perhaps you have your own preferred reminder time. In response to the two requirements, you can realize them simply with Outlook VBA. Here are the concrete VBA codes and elaborate steps.

Auto Accept Specific Meeting Invitations and Update the Meeting Reminder

  1. In the first place, start Outlook application and head to “Developer” tab.
  2. Then you should click “Visual Basic” button.
  3. In the new screen of “Microsoft Visual Basic for Applications”, you need open “ThisOutlookSession” project and copy the following codes into it.
Public WithEvents olItems As Outlook.Items

Private Sub Application_Startup()
    Set olItems = Outlook.Application.Session.GetDefaultFolder(olFolderInbox).Items
End Sub

Private Sub olItems_ItemAdd(ByVal Item As Object)
    Dim olMtRequest As MeetingItem
    Dim olMtAppt As AppointmentItem
    Dim olMtResponse As MeetingItem
 
    If TypeName(Item) = "MeetingItem" Then
       Set olMtRequest = Item
       'Get the corresponding appointment in your calendar
       Set olMtAppt = olMtRequest.GetAssociatedAppointment(True)
 
       'Check meeting organizer and its date
       If olMtAppt.Organizer = "specific person name" Then
          If WeekdayName(Weekday(olMtAppt.Start)) <> "specific day" Then
             With olMtAppt
                  'Replace "45" with your desired reminder time
                  .ReminderMinutesBeforeStart = 45
                  'Set a specific category
                  .Categories = "specific category name"
                  .Save
             End With
             'Accept and then delete the meeting request
             Set olMtResponse = olMtAppt.Respond(olMeetingAccepted)
             olMtResponse.Send
             olMtRequest.Delete
          End If
       End If
    End If
End Sub

VBA Codes - Auto Accept Specific Meeting Invitations and Update the Meeting Reminder

  1. After that, you should create a new digital certificate and assign it to the new code.Digitally Sign the New Code
  2. Subsequently, you can exit the “Visual Basic” window and change the macro settings to permit digitally signed macros only.Change the Macro Settings
  3. Thereafter, when you get the meeting invitation from the specific organizer and not occurred on the specific day, Outlook will automatically accept it and send a response. And then it will auto update the reminder of the meeting in your calendar as per your preset minute in codes.

Watch out for Harmful Factors to Outlook

Outlook data is vulnerable to many factors, such as viruses, malware and power outage and so on. Therefore, it is vitally important to keep vigilant against them. Otherwise, you will push your Outlook at risk. Of course, if you have a good habit of making regular backups, you can easily recover corrupt Outlook file. But if you have no backups in place, you would be required to take recourse to a robust tool, like DataNumen Outlook Repair.

Author Introduction:

Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including repair corrupted SQL and outlook repair software products. For more information visit www.datanumen.com

Leave a Reply

Your email address will not be published. Required fields are marked *