Delete calendar event using iCalendar file import (Outlook 2003 problem)?
Asked Answered
H

9

20

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
Herrera answered 10/12, 2008 at 16:6 Comment(0)
H
14

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
Herrera answered 10/12, 2008 at 21:16 Comment(2)
FYI Google is case-sensitive for CANCELLED; STATUS:Cancelled fails silently.Auscultate
Has anyone tried this in the latest outlook 365 desktop client (Office 365 MSO(16.0.11601.20184) 64 bit ), for me the delete is not working, I have already tried all the answers from this thread. Here is the question describing the issue in detail #56754829Wiseman
L
8

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.

Lotuseater answered 31/7, 2013 at 19:43 Comment(2)
I don't think this will work. If I have 10 events in first sync and in next sync one of the events is removed (not present in ics file). The missing event is still present in iCal or any other calendar(google etc.) and is not removed even though new sync doesn't have that event.Abradant
@Abradant You are right. I made a mistake and posted my answer here but my answer isn't meant for file import. It is meant for importing calendars from a URL. e.g. in Google Calendar adding a calendar by URL, not importing from a file. This was a mistake on my part, hope my answer didn't waste too much of your time.Lotuseater
M
7

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!

Moist answered 12/9, 2011 at 14:57 Comment(0)
S
2

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
Sophocles answered 24/6, 2014 at 15:51 Comment(0)
H
1

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.

Herrera answered 10/12, 2008 at 21:30 Comment(0)
N
1

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

Ney answered 10/3, 2009 at 17:44 Comment(0)
A
1

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.

Ailina answered 4/8, 2011 at 11:58 Comment(1)
do you just pick a random one ?Lilias
B
0

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

Beabeach answered 4/11, 2009 at 11:32 Comment(0)
E
0

You should do these steps to delete the calendar event

  1. UID must be same
  2. Add METHOD:CANCEL
  3. Add STATUS:CANCELLED
  4. SEQUENCE must be greater than the created event
Electrocautery answered 19/2, 2019 at 18:11 Comment(1)
I have tried all possibilities nothing worked.Tweeddale

© 2022 - 2024 — McMap. All rights reserved.