如何在Outlook中区分两种类型的重复任务? [英] How to differentiate 2 types of recurring tasks in Outlook ?

查看:137
本文介绍了如何在Outlook中区分两种类型的重复任务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我之前已经问过这个问题,但似乎并不那么清楚。我尝试在下面详细说明:

I have asked this question before but seems not that clear. I try to write in more detail below:

首先,请按照以下步骤生成2个任务项。

First of all, please follow these steps to produce 2 task items.

1)首先从菜单中创建一个正常的重复任务 - 任何类型的重复都不重要。就像下面的那个。我们称之为项目1.


2)接下来,通过将项目1标记为"完成"来创建(或生成)另一个任务项。创建另一个任务,如下所示。我们称之为项目2.从下图中,两个项目都是重复出现但它们显示不同的图标。




<从Outlook UI创建上述2个任务项后,将编写一个程序来检查这两个项的属性,并找到以下内容:
(使用C#,office studio for office 2005和主互操作程序集)))2项具有不同的'EntryID'(因此我假设它们是独立的实体)
ii)当检查属性'TaskItem.IsRecurring'时,它们都返回'true ',这意味着它们都有重复的规则。
iii)所以我继续使用'TaskItem.GetRecurrencePattern'来检索重复模式这两个项目。当检查'Recurrence.Exceptions'字段时,它们都返回'null',这意味着它们不是彼此的例外。

我的问题是:
如何区分上述2种类型的重复项目(项目1是正常的重复任务,而项目2似乎是重复出现,但与项目1不完全相同)以编程方式?或者'TaskItem'的哪个属性可以清楚地说明2之间的区别?我已经检查了'TaskItem'中的所有属性,但找不到任何可以区分的属性。

1) First create a normal recurring task from menu -- any types of recurring is not important. Just like the one below. Let's call it item 1.




 2) Next, create (or generate) another task item by marking item 1 to 'Complete'. Another task is created as shown below. Let's call it item 2. From the diagram below, both items are recurring but they show different icons. 




3) Although item 2 is recurring, toggling the 'Complete' flag won't generate new task item as for item 1.




After creating the above 2 task items from Outlook UI, a program is written to check the attributes of these 2 items and the following is found:
(using C#, visual studio tools for office 2005 and primary interop assembly)

i) The 2 items have different 'EntryID' (so I assume they are separate entities)
ii) When checking the attribute 'TaskItem.IsRecurring', both of them return 'true', which means both of them have recurring rules.
iii) So I go on using 'TaskItem.GetRecurrencePattern' to retrieve the recurrence pattern of both items. When checking the 'Recurrence.Exceptions' field, both of them return 'null', which means they are not exception to each other.

My question is:
How can I differentiate the above 2 types of recurring items (item 1 is a normal recurrinng task while item 2 seems to be recurring but doesn't behave exactly as item 1) programmatically ? Or which property of 'TaskItem' can clearly state the difference between the 2 ? I have already examined all properties in 'TaskItem' but can't find any property that can tell the difference.

推荐答案



条目ID不同意味着两种不同的约会。如果appointment.IsRecurring为true,则比较这两个定期约会的最佳选项是

1。 appointment.GetRecurrencePattern()。PatternStartDate
2。 appointment.GetRecurrencePattern()。RecurrenceType [不确定使用正确的属性名称]
3。 appointment.GetRecurrencePattern()。PatternEndDate
4。 appointment.GetRecurrencePattern()。Occurence
5。 appointment.GetRecurrencePattern()。间隔

大多数这些属性将帮助您在两个定期约会之间进行区分。

另一个关于"GetRecurrencePattern()。异常"的重要信息。 - 仅在编辑重复发生模式时才会设置此项。假设您改变了第二次出现的开始时间。

我希望我能提供帮助。
Hi,

Entry ID is different means two different appointments. If appointment.IsRecurring is true then best option to compare these two recurring appointment are

1. appointment.GetRecurrencePattern().PatternStartDate
2. appointment.GetRecurrencePattern().RecurrenceType [Not sure used right property name]
3. appointment.GetRecurrencePattern().PatternEndDate
4. appointment.GetRecurrencePattern().Occurence
5. appointment.GetRecurrencePattern().Interval

Mostly these properties will help you diffrentiate between two recurring appointments.

Another important information about "GetRecurrencePattern().Exceptions" - this will be set only if you edit your recurrence pattern. Say you changed start time of your second occurence.

I hope i was helpful.


这篇关于如何在Outlook中区分两种类型的重复任务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆