Open.ics with Outlook 2013 to read items

This applies to Office 2013.

In previous versions of Office (2010), I had a script that downloaded the .ics attachment and then saved it to my calendar. After downloading the .ics, I then loop over the .ics file and copy everything AppointmentItem

to my calendar.

Dim oSharedFolder As Outlook.folder
Set oSharedFolder = _
    Application.GetNamespace("MAPI").OpenSharedFolder( _


However, in 2013 the VBA method OpenSharedFolder

no longer allows me to do this, saying "The operation failed". When looking at the MSDN documentation, I see:

OpenSharedFolder - This method does not support iCalendar destination (.ics) files. To open iCalendar appointment files, you can use the OpenSharedItem method of the NameSpace object

Good perfect! They replaced the name with OpenSharedItem instead (ignore their example using the .ics .. file, which has the same error). However, when I go there I see:

OpenSharedItem - This method does not support iCalendar (.ics) files. To open iCalendar files you can use the OpenSharedFolder method of the NameSpace object

So both of these links are related to each other - wrong, I might add as both refused, although both examples say they work for ics files.

My question is:

  • How to open .ics file using Outlook 2013 vba?

source to share

1 answer

I can only think about parsing the ICS file in your code, or use Redemption : it will allow you to import files from the ICS event using RDOAppointmentItem. Import (..., olICal), but it also won't let you handle multiple events in one ICS file ..



All Articles