Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Create ics file with mult vEvents on same day

Help
2011-03-30
2013-06-05
  • Mike Taylor
    Mike Taylor
    2011-03-30

    Hi,

    I am trying to create an ics file that contains multiple vevents that occur on the same day (but different times obviously).
    The following file works on most, if not all clients, except MS Outlook 2007/2010 (didn't test 2003 - we have dropped support for that monstrosity).

    This example will work fine if the two events occur on different days; just not on the same day.

    Anyone have any experience with this case, or can anyone indentify what I am doing wrong?

    Thanks a bunch!
    /mt
    P.S. I did an exhaustive search on these forums; but I didn't see any related topics.
    I apologize if this is a repeat.  Surprised to not find this issue already.

    Here is an example file:

    BEGIN:VCALENDAR
    VERSION:2.0
    METHOD:PUBLISH
    X-MS-OLK-FORCEINSPECTOROPEN:TRUE
    BEGIN:VTIMEZONE
    TZID:America/New_York
    TZURL:http://tzurl.org/zoneinfo-outlook/America/New_York
    X-LIC-LOCATION:America/New_York
    BEGIN:DAYLIGHT
    TZOFFSETFROM:-0500
    TZOFFSETTO:-0400
    TZNAME:EDT
    DTSTART:19700308T020000
    RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
    END:DAYLIGHT
    BEGIN:STANDARD
    TZOFFSETFROM:-0400
    TZOFFSETTO:-0500
    TZNAME:EST
    DTSTART:19701101T020000
    RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
    END:STANDARD
    END:VTIMEZONE
    BEGIN:VEVENT
    DTSTART;TZID="America/New_York":20110402T150000
    DTEND;TZID="America/New_York":20110402T160000
    LOCATION;ENCODING=QUOTED-PRINTABLE:Testing
    UID:395709103@somewhere.com
    DTSTAMP:20110330T110220
    RRULE:FREQ=DAILY;INTERVAL=1;COUNT=2
    DESCRIPTION: Description for event 1 goes here.
    SUMMARY;ENCODING=QUOTED-PRINTABLE: Event 1
    BEGIN:VALARM
    TRIGGER:-PT15M
    ACTION:DISPLAY
    DESCRIPTION:Reminder
    END:VALARM
    END:VEVENT
    BEGIN:VEVENT
    UID:395709103@somewhere.com
    DTSTAMP:20110330T150220Z
    DESCRIPTION: Description for event 2 goes here.
    SUMMARY;ENCODING=QUOTED-PRINTABLE: Event 2
    DTSTART;TZID=America/New_York:20110402T170000
    DTEND;TZID=America/New_York:20110402T180000
    RECURRENCE-ID;TZID=America/New_York:20110403T150000
    END:VEVENT
    END:VCALENDAR

     
  • Mike Taylor
    Mike Taylor
    2011-03-30

    I forgot to mention:
    After launching, Outlook returns the generic Ics file is not a valid "Internet Calendar File".

     
  • Ben Fortuna
    Ben Fortuna
    2011-03-30

    Hi Mike,

    There is actually a very useful iCalendar validation tool created by Doug Day of Day Software:

    http://icalvalid.cloudapp.net

    I plugged in your sample and it seems to pass most validation, however there is 1 error and 3 warnings. The error is the missing PRODID calendar property - this is pretty easy to fix, and could be a cause for Outlook to reject the file.

    The warnings relate to the use of QUOTED-PRINTABLE encoding, which is apparently deprecated.

    I would try adding the PRODID first to see if this fixes the problem.

    regards,
    ben

     
  • Mike Taylor
    Mike Taylor
    2011-03-31

    Thanks Ben.

    I was actually using this validator: http://severinghaus.org/projects/icv/
    Looks like Mr Day's enforces a newer spec, or is just more strict.

    In any case, I modified the file to add the ProdID, and to get a score of 100 - still no luck for MS Outlook 2007/10.

    I have been posting on MSDN forums as well, so far no response.

    Thanks again,
    /mt

     
  • Mike Taylor
    Mike Taylor
    2011-03-31

    Thought I would provide an update in case someone else has this issue.
    So, if you import this file via MS Outlook import function - it will work w/o error.
    Not sure what the import function does differently, I have a post over at msdn for the curious:
    http://goo.gl/qp8fv

     
  • Malu
    Malu
    2013-02-06

    I am having same problem with Outlook 2007/2010. Were you able to find a solution without using the impot option in Outlook? 

     
  • Mike Taylor
    Mike Taylor
    2013-02-06

    Sadly, no.