ICalendar和事件更新無法在Outlook中運行

[英]ICalendar and event updates not working in Outlook


I'm generating ICalendar (.ics) files.

我正在生成ICalendar(.ics)文件。

Using the UID and SEQUENCE fields I can update existing events in Google Calendar and in Windows Calendar BUT NOT in MS Outlook 2007 - it just creates a second event

使用UID和SEQUENCE字段,我可以更新Google日歷和Windows日歷中的現有事件,但不能更新MS Outlook 2007中的現有事件 - 它只會創建第二個事件

How do I get them to work for Outlook ?

如何讓他們為Outlook工作?

Thanks

Tom

5 个解决方案

#1


20  

I've continued to do some testing and have now managed to get Outlook to update and cancel events based on the .cs file.

我繼續做一些測試,現在設法讓Outlook根據.cs文件更新和取消事件。

Outlook in fact seems to respond to the rules defined in RFC 2446

事實上,Outlook似乎響應RFC 2446中定義的規則

In summary you have to specify

總之,你必須指定

METHOD:REQUEST and ORGANIZER:xxxxxxxx

方法:請求和組織者:xxxxxxxx

in addition to UID: and SEQUENCE:

除了UID:和SEQUENCE:

For a cancellation you have to specify METHOD:CANCEL

要取消,您必須指定METHOD:CANCEL

Request/Update Example

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//SYFADIS//PORTAIL FORMATION//FR
METHOD:REQUEST
BEGIN:VEVENT
UID:TS_229377_MS_262145@syfadis.com
SEQUENCE:5
DTSTAMP:20081106T154911Z
ORGANIZER:catalog@syfadis.com
DTSTART:20081113T164907
DTEND:20081115T170000
SUMMARY:TestTraining
STATUS:CONFIRMED
END:VEVENT
END:VCALENDAR

Cancel Example;

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//SYFADIS//PORTAIL FORMATION//FR
METHOD:CANCEL
BEGIN:VEVENT
UID:TS_229377_MS_262145@syfadis.com
SEQUENCE:7
DTSTAMP:20081106T154916Z
ORGANIZER:catalog@syfadis.com
DTSTART:20081113T164907
SUMMARY:TestTraining
STATUS:CANCELLED
END:VEVENT
END:VCALENDAR

#2


8  

I got a hold of Tom Carter, the asker. He had a working example with a request followed by a cancellation. What I had wrong was my METHOD was inside my VEVENT when it should have been outside. So here is a working update!

我找到了提問者湯姆卡特。他有一個工作示例,其中包含請求,然后取消。我錯的是我的方法在我的VEVENT里面應該在外面。所以這是一個工作更新!

Original:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//WA//FRWEB//EN
METHOD:REQUEST
BEGIN:VEVENT
UID:FRICAL201
SEQUENCE:0
DTSTAMP:20081108T151809Z
ORGANIZER:donotreply@test.com
DTSTART:20081109T121200
SUMMARY:11/9/2008 12:12:00 PM TRIP FROM JFK AIRPORT (JFK)
LOCATION:JFK AIRPORT (JFK)
END:VEVENT
END:VCALENDAR

Update:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//WA//FRWEB//EN
METHOD:REQUEST
BEGIN:VEVENT
UID:FRICAL201
SEQUENCE:1
DTSTAMP:20081108T161809Z
ORGANIZER:donotreply@test.com
DTSTART:20081109T121300
SUMMARY:11/9/2008 12:13:00 PM TRIP FROM JFK AIRPORT (JFK)
LOCATION:JFK AIRPORT (JFK)
END:VEVENT
END:VCALENDAR

All I did was add the request method (in the correct spot!), and an organizer.

我所做的就是添加請求方法(在正確的位置!)和組織者。

#3


3  

I am using outlook 2003 (from reading the posts, 2007 appears to behave in the same way) and you need to clearly distinguish between the behaviour of the explicit file import of an ics file and the implicit import when an ics file is 'double clicked'.

我正在使用outlook 2003(從閱讀帖子,2007看起來行為方式相同),你需要清楚地區分ics文件的顯式文件導入行為和雙擊ics文件時的隱式導入”。

On the Outlook menu File / Import and Export ... Outlook will load as many VEVENT entries as are in the file and no amount of changing UID:, SEQUENCE: or DTSTAMP: values changes this, i.e.if you change any data and re-import it you just get a duplicate set of entries.

在Outlook菜單上文件/導入和導出... Outlook將加載與文件中一樣多的VEVENT條目,並且沒有更改UID:,SEQUENCE:或DTSTAMP:值會更改此值,即如果您更改任何數據並重新導入它只是獲得一組重復的條目。

If you double click on an ics file it processes the first VEVENT entry only. However it does recognise the UID and, if the DTSTAMP: is later (the SEQUENCE can be the same but not lower) you will be prompted and it will update the event in your calendar.

如果雙擊ics文件,它只處理第一個VEVENT條目。但它確實識別UID,如果DTSTAMP:稍后(SEQUENCE可以相同但不低),系統將提示您,它將更新您日歷中的事件。

BEGIN:VCALENDAR
VERSION:2.0
PRODID:www.membership-services.net
METHOD:REQUEST
BEGIN:VEVENT
DTSTART:20090126T210000
DTEND:20090126T220000
SUMMARY:Avondale - Thameside Away Game vs Croydon
LOCATION:Whitgift School
DESCRIPTION:http://maps.google.co.uk/maps?f=q&hl=en&geocode=&q=CR2+6YT 
UID:AWPC_8
SEQUENCE:0
DTSTAMP:20090123T112600
END:VEVENT
BEGIN:VEVENT
DTSTART:20090202T213000
DTEND:20090202T223000
SUMMARY:Avondale - Thameside Home Game vs Orcas
LOCATION:Putney
DESCRIPTION:http://maps.google.co.uk/maps?f=q&source=s_q&hl=en&ie=UTF8&ll=51.4635,-0.2285&spn=0.005,0.009613&t=h&z=17&iwloc=lyrftr:w2t.90,0x48760f04a04b1801:0x49ebf12503a5d5a9,51.463459,-0.228674 
UID:AWPC_10
SEQUENCE:0
DTSTAMP:20090123T112600
END:VEVENT
END:VCALENDAR

#4


2  

add this to your ICS file

將其添加到您的ICS文件中

X-WR-RELCALID:MyCal123   

where MyCal123 is a unique identifier for your calendar.

其中MyCal123是您日歷的唯一標識符。

By adding this line to an ICS file the entire calendar gets updated (after a prompt in Outlook). You don't even need to change the DTSTAMP or SEQUENCE or ORGANIZER and METHOD:PUBLISH is fine for the update. Just update the event details, double-click the ICS and the calendar will update. Note that this also works fine if you have published the calendar and provided a URL for people to view it. They just need to hit refresh after about 2mins and they will also get the update.

通過將此行添加到ICS文件,整個日歷將更新(在Outlook中提示后)。您甚至不需要更改DTSTAMP或SEQUENCE或ORGANIZER和METHOD:PUBLISH適用於更新。只需更新活動詳細信息,雙擊ICS即可更新日歷。請注意,如果您已發布日歷並提供了供人們查看的URL,這也可以正常工作。他們只需要在大約2分鍾后點擊刷新,他們也將獲得更新。

Thanks to David Bjørnhart for pointing this out: ICal import creates new calendar When Open the ics file

感謝DavidBjørnhart指出這一點:ICal導入創建新日歷打開ics文件時

#5


0  

I'm using Entourage, so this may not match up exactly with the behavior you're seeing, but I hope it helps.

我正在使用Entourage,所以這可能與您所看到的行為完全不符,但我希望它有所幫助。

Using the iCalendar from your reply, Entourage wouldn't even import the data. Using a known-good file, I got it to import, then successfully update. Comparing the two files, the only structural differences are as follows:

使用回復中的iCalendar,Entourage甚至不會導入數據。使用已知良好的文件,我將其導入,然后成功更新。比較這兩個文件,唯一的結構差異如下:

  • My known-good doesn't have a VERSION element
  • 我知道的好東西沒有VERSION元素

  • My known-good doesn't have a PRODID element
  • 我知道的好東西沒有PRODID元素

  • My known-good doesn't have a STATUS element
  • 我的知名商品沒有STATUS元素

  • My known-good doesn't have a SEQUENCE element
  • 我知道的好東西沒有SEQUENCE元素

Since Microsoft's support for open standards tends to lag, I'd suggest trying without the VERSION info.

由於微軟對開放標准的支持往往滯后,我建議不要使用VERSION信息。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2008/09/05/72060acf366c43e6f57919d4b308b0e6.html



 
粤ICP备14056181号  © 2014-2020 ITdaan.com