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信息。

智能推荐

注意!

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



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

赞助商广告