Auto accept outlook VBA

Is there a VB macro or some add-on that will allow me to automatically accept Outlook invitations by sender or folder?

I was thinking of making a VB script for this, but I don't want to reinvent the wheel?

+3
source share
1 answer

I have used this in the past by adding this sub to the VBA page and plugging your rule so that it works when you receive it from senders certian and invite it to invite or update.

Sub AutoAccept(ByRef Item As Outlook.MeetingItem)

  Dim strID As String
  Dim olNS As Outlook.NameSpace
  Dim oMeetingItem As Outlook.MeetingItem
  Dim oResponse As Outlook.MeetingItem
  Dim oAppointment As Outlook.AppointmentItem

  strID = Item.EntryID

  Set olNS = Application.GetNamespace("MAPI")
  Set oMeetingItem = olNS.GetItemFromID(strID)
  Set oAppointment = oMeetingItem.GetAssociatedAppointment(True)

  Set oResponse = oAppointment.Respond(olMeetingAccepted)
  oResponse.Send

  oAppointment.Save
  oMeetingItem.Save


  Set oAppointment = Nothing
  Set oMeetingItem = Nothing
  Set olNS = Nothing

End Sub
+1
source

Source: https://habr.com/ru/post/1737530/


All Articles