How to create a .ICS file with multiple VEVENTs to be imported into an existing Outlook Calendar
Solution 1
I don't think this will work. Outlook is limited in importing those "open" specs. I had a similar problem trying to import a vCard file with multiple contacts. I ended up splitting the file and writing a script in Outlook to import all the files in a directory.
Solution 2
This is possible, using an Internet Calendar (like from Google). Outlook 2007 has the capabilities to subscribe to an Internet Calendar (under Account Settings) and Outlook 2003 has an open-source plug-in available. You could create an accessible feed that is "read-only". The format is like
BEGIN:VCALENDAR
PRODID:-//XYZ Corp//My Product//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:My Calendar
X-WR-TIMEZONE:(GMT-05:00) Eastern Time (US & Canada)
BEGIN:VEVENT
DTSTART:20061021T100000Z
DTEND:20061021T130000Z
DTSTAMP:20090211T175526Z
UID:5f98dfd5-ac72-4ae1-b3c2-799a4e7c91f9
CLASS:PUBLIC
CREATED:20071104T183833Z
DESCRIPTION: My description text.
LAST-MODIFIED:20071104T183833Z
LOCATION: 123 Anywhere Street\; Anyplace, NJ 12345\; US
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY: My summary text.
TRANSP:OPAQUE
END:VEVENT
BEGIN:VEVENT
DTSTART:20061101T170000Z
DTEND:20061101T180000Z
DTSTAMP:20090211T175526Z
UID:6eaef015-eb90-4e94-8e6c-0003b928969a
CLASS:PUBLIC
CREATED:20071104T183833Z
DESCRIPTION: My description for number 2.
LAST-MODIFIED:20071104T183833Z
LOCATION: 123 Anywhere Street\; Anyplace, NJ 12345\; US
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY: My summary for #2.
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR
Solution 3
Make sure you are using a unique UID for every VEVENT. If you use the same UID for every VEVENT you would see exactly the behavior you are describing since only unique UID's are processed and added to the calendar.
HTH.
Solution 4
Make sure you have "X-MS-OLK-FORCEINSPECTOROPEN:TRUE" in the VCALENDAR part of your file. This allows an ICS file with multiple VEVENTs to import into your default calendar in Outlook. No new calendar created.
Solution 5
this is an example of three FIFA 2010 matches on outlook, I'm guessing that this is what you are looking for...
BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 12.0 MIMEDIR//EN
VERSION:2.0
METHOD:PUBLISH
X-CALSTART:20100611T140000Z
X-CALEND:20100711T201500Z
X-WR-RELCALID:{0000002E-5A22-AA75-713B-5C3715764495}
X-WR-CALNAME: World Cup Football Complete Match Schedule 2010 South Africa
BEGIN:VEVENT
CATEGORIES:World Cup Football Complete Match Schedule 2010 South Africa
CLASS:PUBLIC
CREATED:20100608T231102Z
DESCRIPTION:Group A\nFollow MarkThisDate on Twitter
markthisdate
DTEND:20100611T154500Z
DTSTAMP:20100513T100200Z
DTSTART:20100611T140000Z
LAST-MODIFIED:20100608T231102Z
LOCATION:Johannesburg
PRIORITY:5
SEQUENCE:0
SUMMARY:South Africa - Mexico
TRANSP:TRANSPARENT
UID:[email protected]
X-MICROSOFT-CDO-BUSYSTATUS:FREE
X-MICROSOFT-CDO-IMPORTANCE:1
END:VEVENT
BEGIN:VEVENT
CATEGORIES:World Cup Football Complete Match Schedule 2010 South Africa
CLASS:PUBLIC
CREATED:20100608T231102Z
DESCRIPTION:Group A\nFollow MarkThisDate on Twitter
markthisdate
DTEND:20100611T201500Z
DTSTAMP:20100513T100200Z
DTSTART:20100611T183000Z
LAST-MODIFIED:20100608T231102Z
LOCATION:Cape Town
PRIORITY:5
SEQUENCE:0
SUMMARY:Uruguay - France
TRANSP:TRANSPARENT
UID:[email protected]
X-MICROSOFT-CDO-BUSYSTATUS:FREE
X-MICROSOFT-CDO-IMPORTANCE:1
END:VEVENT
BEGIN:VEVENT
CATEGORIES:World Cup Football Complete Match Schedule 2010 South Africa
CLASS:PUBLIC
CREATED:20100608T231102Z
DESCRIPTION:Group B\nFollow MarkThisDate on Twitter
markthisdate
DTEND:20100612T131500Z
DTSTAMP:20100513T100200Z
DTSTART:20100612T113000Z
LAST-MODIFIED:20100608T231102Z
LOCATION:Nelson Mandela Bay/Port Elizabeth
PRIORITY:5
SEQUENCE:0
SUMMARY:Korea Republic - Greece
TRANSP:TRANSPARENT
UID:[email protected]
X-MICROSOFT-CDO-BUSYSTATUS:FREE
X-MICROSOFT-CDO-IMPORTANCE:1
END:VEVENT
END:VCALENDAR
mwilkes
Updated on February 23, 2022Comments
-
mwilkes about 2 years
I have a need to allow for a user to download an event that has multiple meeting dates. To do this I have created a memorystream to be downloaded which produces a .ics file. For example:
BEGIN:VCALENDAR PRODID:-//Company//Product//EN VERSION:2.0 METHOD:PUBLISH BEGIN:VEVENT SUMMARY:Subject of Event LOCATION:Location of Event UID:[email protected] DESCRIPTION:Some description DTEND:20081101T200000Z DTSTART:20081101T200000Z PRIORITY:3 END:VEVENT BEGIN:VEVENT ... END:VEVENT END:VCALENDAR
If I only include one VEVENT in this file it will save it to my existing Outlook calendar. However, when I have multiple VEVENTs it wants to open it as a new calendar and files it under "Other Calendars".
Is there a way (without using File - Import from within Outlook) to specify that the calendar should be imported automatically into the existing calendar when opened?
UPDATE: To clarify, each VEVENT is related to a single "Appointment". However there may or may not be a recurring pattern.
-Mike
-
Tomalak over 15 yearsIs it the same appointment, with a recurrence pattern or are the appointments not related to each other?
-
mwilkes over 15 yearsIt is the same appointment...unfortunately there may or may not be a recurring pattern. For instance it meets on Tuesday this week and Wednesday the next week, etc..
-
Tomalak over 15 yearsI suppose the "VBEGIN" is a typo?
-
matt b about 12 yearsI believe the property
X-MS-OLK-FORCEINSPECTOROPEN:TRUE
is meant to fix this problem "when I have multiple VEVENTs it wants to open it as a new calendar and files it under "Other Calendars"" -
masciugo almost 7 years@mattb that way my outlook 2013 ignores the other events importing only the first one
-
-
Tomalak over 15 yearsYes, I was thinking the same thing. Multiple events work for a subscribed .ics calendar, though.
-
cwd about 11 yearsI am interested in checking this method. Looks like you can get more examples at markthisdate.com (which is where the source of this example seems to come from) although I'm not sure if it will work on Outlook or not (on a Mac right now)
-
jcaruso over 7 yearsNo it's not because it doesn't import into the current calendar.
-
jcaruso over 7 yearsTried using this and got an error that its not a valid ics file.
-
Leniency over 4 yearsTested this and it doesn't appear to work fully, at least in O365 Outlook. It prompts to add only the first VEVENT in the file - any others are no added to the main calendar.
-
miked over 4 yearsX-MS-OLK-FORCEINSPECTOROPEN:TRUE only effects the outlook calendar the event is added to. If you are only processing the first VEVENT, the there is another issue with your ICS file. Issues relatred witrh the UID or start times/dates so the system can match the VEVENTS.
-
jwmiller5 over 3 years@Bellu Try opening the ics from Outlook Web Access. According to this post it works in OWA, not in Outlook. answers.microsoft.com/en-us/msoffice/forum/all/…