views:

2200

answers:

4

Is there a way for me to delete items from calendar by using iCalendar import?

I know that there is a METHOD:CANCEL, however when I tried it, it didn't do anything to the calendar event.

Here is what is in my iCalendar file. When I try to import it to Outlook, it just adds these events.

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//DDay.iCal//NONSGML ddaysoftware.com//EN
METHOD:CANCEL
BEGIN:VEVENT
CREATED:20081210T155315Z
DESCRIPTION:
DTEND:20081213T093000
DTSTAMP:20081210T155315Z
DTSTART:20081213T093000
LOCATION:
ORGANIZER:MAILTO:[email protected]
SEQUENCE:1
SUMMARY:From FCS 13th
UID:20367b86-2123-4930-87ef-5c2a6626bd9f
BEGIN:VALARM
ACTION:DISPLAY
SUMMARY: Event 13th
TRIGGER:-PT30M
END:VALARM
END:VEVENT
BEGIN:VEVENT
CREATED:20081210T155315Z
DESCRIPTION:
DTEND:20081211T093000
DTSTAMP:20081210T155315Z
DTSTART:20081211T093000
LOCATION:7 West
ORGANIZER:MAILTO:[email protected]
SEQUENCE:1
SUMMARY:Event 11th
UID:f212ab15-86c3-46c8-8592-af0716a40ea2
BEGIN:VALARM
ACTION:DISPLAY
SUMMARY:Event on 11th
TRIGGER:-PT30M
END:VALARM
END:VEVENT    
END:VCALENDAR
+1  A: 

I forgot to add STATUS:CANCELLED

Now this should cancel items according to http://en.wikipedia.org/wiki/ICalendar#Events_.28VEVENT.29

This works in Google Calendar but not in Outlook 2003. Outlook still creates duplicate entries.

Here are modified "cancel" events with 'STATUS:CANCEL'.

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//DDay.iCal//NONSGML ddaysoftware.com//EN
X-WR-RELCALID:928C8448-048A-4aa2-BE27-A920773AF3DC
METHOD:CANCEL
BEGIN:VEVENT
CREATED:20081210T210344Z
DESCRIPTION:
DTEND:20081213T093000
DTSTAMP:20081210T210344Z
DTSTART:20081213T093000
LOCATION:
ORGANIZER:MAILTO:[email protected]
SEQUENCE:1
STATUS:CANCELLED
SUMMARY:Event to export 1
UID:20367b86-2123-4930-87ef-5c2a6626bd9f
BEGIN:VALARM
ACTION:DISPLAY
SUMMARY:Event to export 1
TRIGGER:-PT30M
END:VALARM
END:VEVENT
BEGIN:VEVENT
CREATED:20081210T210344Z
DESCRIPTION:
DTEND:20081211T093000
DTSTAMP:20081210T210344Z
DTSTART:20081211T093000
LOCATION:7 West
ORGANIZER:MAILTO:[email protected]
SEQUENCE:1
STATUS:CANCELLED
SUMMARY:Event to export 2
UID:f212ab15-86c3-46c8-8592-af0716a40ea2
BEGIN:VALARM
ACTION:DISPLAY
SUMMARY:Event to export 2
TRIGGER:-PT30M
END:VALARM
END:VEVENT
END:VCALENDAR
dev.e.loper
+1  A: 

I might need to set X-WR-RELCALID tag, according to this http://www.oesf.org/forum/index.php?act=Print&client=printer&f=63&t=2650

It states: "Before syncing for the first time, you MUST add a X-WR-RELCALID tag to the mycalendar.ics file, or else iCal will change the UID number of all entries, causing duplicates."

However I can't find any documentation on RELCALID tag in protocol http://tools.ietf.org/html/rfc2446

When I set X-WR-RELCALID, Outlook still creates duplicate events instead of removing those events.

Is there any documentation on X-WR-RELCALID? I can't find it.

dev.e.loper
A: 

I don´t know if this helps, try setting SEQUENCE: 2

A: 

Outlook creates a duplicate event if you change the UID property. You have to create another event with the same UID.

Aurelio