开发者

With .ics files can I delete old events?

Im currently working on an .ics export from our application.

Can I somehow delete old events, so in my first import into outlook 开发者_开发技巧I have 152 events and during my second import I only have 100 events. Then I would like the import to automatically delete all 52 events from Outlook, is this possible?

I know that I can make events canceled, but that is not what I want.


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. Also set METHOD:CANCEL in the header and STATUS:CANCELLED in VEVENT. Like this:

This ics to create the event:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:http://www.example.com/example/
X-WR-RELCALID:ABC
METHOD:PUBLISH
BEGIN:VEVENT
UID:ThisIsTheUID
SEQUENCE:0
ORGANIZER;CN="Mustermann, Max":MAILTO:max@mustermann.com
SUMMARY:Eine Kurzinfo
DESCRIPTION:Beschreibung des Termines
CLASS:PUBLIC
TRANSP:TRANSPARENT
DTSTART:20110804
DTEND:20110805
DTSTAMP:20110804
END:VEVENT
END:VCALENDAR

This ics to cancel/remove the event:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:http://www.example.com/example/
X-WR-RELCALID:ABC
METHOD:CANCEL
BEGIN:VEVENT
UID:ThisIsTheUID
SEQUENCE:2
ORGANIZER;CN="Mustermann, Max":MAILTO:max@mustermann.com
SUMMARY:Eine Kurzinfo
DESCRIPTION:Beschreibung des Termines
CLASS:PUBLIC
TRANSP:TRANSPARENT
DTSTART:20110804
DTEND:20110805
DTSTAMP:20110804
STATUS:CANCELLED
END:VEVENT
END:VCALENDAR
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜