I am looking for some help with a technical issue I have. In my current workplace we have an automatic scheduling system that handles our appointments. When an appointment is booked (through a web based method we have no control over), we are sent an automatic email (all from the same address) with an ICS meeting attachment. We then have to open this attachment for it to appear in our calendars.

The problem - it is extremely time consuming and unreliable, as some people delete the email and pretend they never received it to avoid work! Setting Outlook to automatically accept meetings doesn't work, as they are ICS attachments rather than direct invites.

What I need (ideally) is a way to automatically accept the ICS meeting attachment when the email is received, without any user interface. This should then show up on our calendars automatically.

I have some experience in VBA, but this is extremely minimal and is confined to pasting other peoples solutions in there! So any help on this front would be amazing.

In case you need to know, we use Microsoft Office 2010, so the calendar and emails are all through Outlook 2010.

Thanks all.

  • I did some reading up on this as it sounded a little strange to me that Outlook doesn't see the ICA requests as a meeting - they maybe being sent as an appointment, and this is why the 'Automatically accept meetings requests' option in outlook isn't working. – djsmiley2k - CoW Oct 12 '16 at 10:14
  • I think it is more likely to be because they are sent as email attachments. Essentially, we have a web based calendar (controlled externally) that sends us an email with an ICS as an attachment. We then have to open this attachment to add it to the Outlook calendar. This is tedious when you have a lot to go through, and you can easily lose track of what you have and haven't done. Any thoughts? – Jon Ellis-Fleming Oct 12 '16 at 13:03
  • I don't know if you could create a filter that automatically opens them :/ – djsmiley2k - CoW Oct 12 '16 at 13:07
  • I've tried every combination of rules I can think of. I have tried scripts to auto accept calendar invites, but of course they don't look at attachments. I have a script that can save the attachment to a folder, but this makes no difference when you still have to open them manually to add them to the calendar! Its rather frustrating, as on the surface it seems like something that should be easy to do =/ – Jon Ellis-Fleming Oct 12 '16 at 14:03

I found a script on this website that is supposed to do exactly what you are asking for. Here is the script below :

Public Sub SaveandOpenAttachments(objMsg As mailitem)
Dim objAttachments As Outlook.Attachments
Dim i As Long
Dim lngCount As Long
Dim strFile As String
Dim strFolderpath As String
Dim oAppt As Object

    ' Get the path to your My Documents folder
    strFolderpath = CreateObject("WScript.Shell").SpecialFolders(16)

    On Error Resume Next

    ' Set the Attachment folder. (Folder must exist.)
    strFolderpath = strFolderpath & "\Att temp\"

    Set objAttachments = objMsg.Attachments

    lngCount = objAttachments.Count
      If lngCount > 0 Then
        For i = lngCount To 1 Step -1
         strFile = objAttachments.item(i).FileName
         strFile = strFolderpath & strFile
         Debug.Print strFile
         objAttachments.item(i).SaveAsFile strFile

Set oAppt = Session.OpenSharedItem(strFile)
  oAppt.Close olSave

     ' should delete strfile too
   SetAttr strFile, vbNormal
    Kill strFile

    End If

Set objAttachments = Nothing

End Sub

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.