简体   繁体   English

替换现有的Outlook日历约会

[英]Replace Existing Outlook Calendar Appointment

I'm doing some work with an icalndar appointment generation; 我正在做一个icalndar预约一代的工作; this would allow a delegate to view an event's website and click on a link provided to add an appointment to their calendar. 这将允许代表查看活动的网站,并单击提供的链接以将约会添加到他们的日历。

I have a working assembly that will generate an ics formatted output (as either a physical file or a Stream) based on a known set of information (start date, end date, title etc.). 我有一个工作程序集,它将根据一组已知的信息(开始日期,结束日期,标题等)生成一个ics格式的输出(作为物理文件或流)。

An example of the output I generate for a calendar appointment is the following: 我为日历约会生成的输出示例如下:

BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 12.0 MIMEDIR//EN
VERSION:2.0
METHOD:PUBLISH
X-MS-OLK-FORCEINSPECTOROPEN:TRUE
BEGIN:VEVENT
CLASS:PUBLIC
CREATED:20110210T124703Z
DESCRIPTION:Anything Else\n\nHopefully some useful information would be written here\n
DTEND:20110212T100000Z
DTSTAMP:20110210T124600Z
DTSTART:20110212T090000Z
LAST-MODIFIED:20110210T124703Z
LOCATION:Dummy Location
PRIORITY:5
SEQUENCE:0
SUMMARY;LANGUAGE=en-us:Dummy Meeting
TRANSP:OPAQUE
UID:040000008200E00074C5B7101A82E00800000000B0D1061C57C8CB01000000000000000
    010000000281117EDC1194242B64F0247C54DB401
X-ALT-DESC;FMTTYPE=text/html:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">\n<HTML>\n<HEAD>\n<META HTTP-EQUIV="Content-Type" CONTENT="text/html\;    charset=Windows-1252">\n<META NAME="Generator" CONTENT="MS Exchange Server
 version 6.5.7654.12">\n<TITLE>Dummy Meeting</TITLE>\n</HEAD>\n<BODY>\n<!-
- Converted from text/plain format -->\n\n<P><FONT SIZE=2>&lt\;h1&gt\;Anyt
hing Else&lt\;/h1&gt\;&lt\;p&gt\;Hopefully some useful information would b
e written here&lt\;/p&gt\;<BR>\n</FONT>\n</P>\n\n</BODY>\n</HTML>
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-IMPORTANCE:1
END:VEVENT
END:VCALENDAR

What I have been asked is; 我被问到的是; is it possible to change the appointment, but the next time someone requests the reminder it will detect the appointment as already existing in their calendar and update it instead of creating a new entry? 是否可以更改约会,但下次有人请求提醒时,它会检测到他们的日历中已存在的约会并更新它而不是创建新条目?

So I am trying to find if it is possible to overwrite an existing calendar appointment. 所以我试图找出是否可以覆盖现有的日历约会。

I noticed that there was a UID value, I have tried keeping this value the same, but it doesnt appear to provide a link between the calendar appointments. 我注意到有一个UID值,我试过保持这个值相同,但它似乎没有提供日历约会之间的链接。

Is it possible that the Save and Close action on the calendar appointment generates a new UID so there is no longer a link? 日历约会上的“保存并关闭”操作是否可能生成新的UID,因此不再有链接?

What else can I try? 我还能尝试什么?

It is possible to update PUBLISH ed entries. 可以更新PUBLISH ed条目。 You do not need to change your METHOD to REQUEST (and set RSVP=FALSE on every ATTENDEE ). 您无需将METHOD更改为REQUEST (并在每个ATTENDEE上设置RSVP=FALSE )。

To have a new copy replace any existing one, all you need to do is bump the SEQUENCE value. 要让新副本替换现有副本,您只需要修改SEQUENCE值即可。 The SEQUENCE property is primarily intended to differentiate between versions of an entry where something time related changed (eg DTSTART ). SEQUENCE属性主要用于区分时间相关变化的条目版本(例如DTSTART )。

However RFC 2445 does not preclude SEQUENCE being bumped for any arbitrary reason (eg fixing a typo). 但是, RFC 2445并不排除SEQUENCE因任何原因而被碰撞(例如修复拼写错误)。 Doing so would invalidate any workflow responses for the entry since they would be for lower SEQUENCE values but in the PUBLISH case there is no workflow really; 这样做会使条目的任何工作流响应无效,因为它们将用于较低的SEQUENCE值,但在PUBLISH情况下,确实没有工作流; its all one way. 一切都是这样的。

If you are not making any time related changes to the entry then you can simply change the DTSTAMP value to a newer one. 如果您没有对条目进行任何与时间相关的更改,则只需将DTSTAMP值更改为较新的值即可。 The recipient will see they already have the UID and SEQUENCE value but an older DTSTAMP , so they should simply update what they have already. 收件人将看到他们已经拥有UIDSEQUENCE值,但是已经有了旧的DTSTAMP ,因此他们应该只更新他们已经拥有的内容。

Anyone who fails to update a PUBLISH ed entry when its SEQUENCE or DTSTAMP have been updated does not understand the standard or failed to implement it properly. 任何在更新SEQUENCEDTSTAMP时未能更新PUBLISH ed条目的人都不理解标准或未能正确实施。

It is possible to update an appointment, but not the way you did it. 可以更新约会,但不能更新约会。 Here's what's important: 这是重要的:

  • METHOD should be REQUEST - a PUBLISH event will not update, it will be added again and again. METHOD应该是REQUEST - PUBLISH事件不会更新,它会一次又一次地添加。 REQUEST meeting requests behave differently, and will update the existing meeting even before the user approves it. REQUEST会议请求的行为不同,甚至在用户批准之前更新现有会议。 I'd note that if the events are already of type Publish, they cannot be updated (at least to my knowledge). 我注意到,如果事件已经是Publish类型,则无法更新(至少据我所知)。
  • You must use the exact same UID . 您必须使用完全相同的UID
  • DTSTAMP should be bigger than the existing date stamp (this should be OK if you're creating it dynamically) DTSTAMP应该大于现有的日期戳(如果你动态创建它,这应该没问题)
  • Include an ORGANIZER - Outlook may not allow people to accept the meeting without it (not really related, but important). 包括一个ORGANIZER - Outlook可能不允许人们在没有它的情况下接受会议(不是真的相关,但很重要)。

I have a partial summery of this in my blog - Sending Meeting Requests to Outlook via ASP.NET Mail Message , though it's missing sending the approval to the organizer, and time zones (which are very important, so I've heard). 我在我的博客中对此进行了部分总结 - 通过ASP.NET邮件向Outlook发送会议请求 ,虽然它没有将批准发送给组织者和时区(这非常重要,所以我听说过)。

See also: RFC 2446 - iTIP , search for section 1.3 ITIP Roles and Transactions 另请参阅: RFC 2446 - iTIP ,搜索1.3 ITIP角色和事务

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM