区分Outlook约会 [英] Differentiate between an Outlook appointments

查看:159
本文介绍了区分Outlook约会的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我使用VS 2008为Outlook(2007和2003)开发了VSTO加载项.问题是如何区分已发送给收件人的约会和仅保存并关闭(未发送)的约会. .事情是我必须在数据库中设置一个标志,该标志代表实际使用/发送的约会,但是如上所述,我很难区分这些约会.

提前非常感谢.
亲切的问候,

Hi all,

I have developed a VSTO add-in for Outlook (2007 & 2003) using VS 2008. The thing is how can I differentiate between an appointment that has been sent to the recipients and one that has only been saved and closed (not sent). The thing is I have to set a flag in the DB representing the appointment that was actually used / sent, but as mentioned I''m having trouble distinguishing between the appointments.

Many thanks in advance.
Kind regards,

推荐答案

您可以检查"Outlook.Recipient"的数量. (计数是收件人对象的有效属性.)
如果大于1,则可以将其视为已发送,也可以将其保存并关闭.
You can check "Outlook.Recipient" count. (Count is a valid property of Recipient object.)
If it is greater than 1, you can take it as sent or else just saved and closed.


尽管Sandeep有一个有效的观点,但用户可能会与会议室创建约会/收件人,并决定保存然后关闭约会而不发送它.

我检查了约会项目的Item属性,并注意到仅在单击发送按钮时才获取以下值:

名称:ConversationIndex-类型:olText
名称:EntryID-类型:olText
名称:GlobalAppointmentID-类型:olText

我认为这可能是答案,但我不确定:confused:

亲切的问候,
Although Sandeep has a valid point, a situation may exist where an user creates an appointment with boardrooms / recipients and decides to save and then close the appointment without sending it.

I have checked the Item properties of the appointment item and noticed that the following values are only acquired when the send button is clicked:

Name: ConversationIndex - Type: olText
Name: EntryID - Type: olText
Name: GlobalAppointmentID - Type: olText

I think this might be the answer but I am not sure :confused:

Kind regards,


答案来自:Ken Slovak [MVP-Outlook]


您所缺少的是您将要遇到的方法/事件
在所有托管代码中重载相同的关键字.在这种情况下
AppointmentItem不会直接公开Send事件,因为它使用
与Send方法相同的关键字.

有两种方法可以完成您需要做的事情:

1.在类级别声明一个ItemEvents_Event对象,例如_apptEvents:
私人Outlook.ItemEvents_Event _apptEvents;

然后实例化事件处理程序,以便:
_apptEvents =(Outlook.ItemEvents_Event)_appt;
_apptEvents.Send + =新的Outlook.ItemEvents_SendEventHandler(myHandler);

2.一种替代方法是使用AppointmentItemClass:
私人Outlook.AppointmentItemClass _itemClass; //班级

然后实例化如下:
_itemClass =(Outlook.AppointmentItemClass)_appt;
_itemClass.ItemEvents_10_Event_Send + =等.
Answer from: Ken Slovak [MVP - Outlook]


What you''re missing is what you''re going to run into with methods/events
that overload the same keyword in all managed code. In this case
AppointmentItem doesn''t directly expose the Send event since it uses the
same keyword as the Send method.

There are a couple of ways to do what you need to do:

1. Declare at class level an ItemEvents_Event object, say _apptEvents:
private Outlook.ItemEvents_Event _apptEvents;

Then instantiate the event handler so:
_apptEvents = (Outlook.ItemEvents_Event)_appt;
_apptEvents.Send += new Outlook.ItemEvents_SendEventHandler(myHandler);

2. An alternative is to use AppointmentItemClass:
private Outlook.AppointmentItemClass _itemClass; // class level

Then instantiate as follows:
_itemClass = (Outlook.AppointmentItemClass) _appt;
_itemClass.ItemEvents_10_Event_Send += etc.


这篇关于区分Outlook约会的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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