Reputation: 36034
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
Upvotes: 20
Views: 27529
Reputation: 139
You should do these steps to delete the calendar event
Upvotes: 0
Reputation: 835
This answer is meant for iCal URL feeds not for importing an iCal file!
I looked into this for quite a while and since the answer given doesn't actually resolve the issue for outlook I thought I would post what I have found to work for Outlook, iCal, and Google Calendar.
You just simply do not send the event, if the event is outright just not in the feed anymore then Outlook, Google Calendar, and iCal (from my testing) all just remove the event as if it never existed. So if the event has been cancelled just pretend it never existed and when the local calendars sync they will show events that are explicitly given to them in the feed.
Upvotes: 8
Reputation: 28982
This can be a painful and unpredictable business, and is likely dependent on Outlook version. I have got event cancellations working with Outlook 2010 (v14). I send my icalendar as a single-part message, type text/calendar, as discussed in this thread. As mentionned in the other answers, I have method=CANCEL in the MIME type, and again in the icalendar.
The critical step for me was to add DTSTART to the event. Without this field, the message is not presented as a cancellation, there is nothing in the preview pane, and the calendar is presented as an attachment with the filename "not supported calendar message.ics". But you can put any date you like in the field! DTEND is not important. SEQUENCE could be the same or greater. DTSTAMP is not important, but if present, must be after the DTSTAMP sent with the initial invitation, otherwise the text "not active" appears instead of the "delete from calendar" button.
This is a minimal working cancellation...
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//www.notilus.com//Dimo Gestion Notilus//FR
CALSCALE:GREGORIAN
METHOD:CANCEL
BEGIN:VEVENT
DTSTART:20140625T123000Z
SEQUENCE:1
STATUS:CANCELLED
UID:Kerry
END:VEVENT
END:VCALENDAR
Upvotes: 2
Reputation: 36034
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:CANCELLED'. (British spelling with two L's)
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
Upvotes: 14
Reputation: 211
For me it worked by setting the X-WR-RELCALID
tag in the header of the ics file. Then Outlook recognized the event as the same.
Upvotes: 1
Reputation: 193
I was struggling with this for a while.
As a few others have mentioned you must include the:
METHOD:CANCEL
and
STATUS:CANCELLED
lines of the VEVENT. The UID must be the same as the original event AND the SEQUENCE: number must be the CURRENT sequence number! (you do not need to add 1 from the last sequence number as cancelling the event does not count as an update).
I was having issues as I assumed that the cancellation counted as an update and was therefore incrementing my sequence number, but you do not have to!
Upvotes: 7
Reputation: 1
Outlook creates a duplicate event if you change the UID property. You have to create another event with the same UID.
Upvotes: 0
Reputation: 36034
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 https://www.rfc-editor.org/rfc/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.
Upvotes: 1