搜索 Outlook 2010 会议请求事件 c#

发布于 2024-10-21 16:27:42 字数 200 浏览 4 评论 0原文

我将在 Outlook(对于 Outlook Addin)中检查会议请求(MeetingItem / AppointmentItem)中添加的收件人。 我正在 MeetingItem / AppointmentItem 本身中搜索事件/可能性... 到目前为止我还没有发现任何事件,其中添加了对收件人负责的情况。 有人可以给我一些关于我应该如何进行的提示吗?

谢谢 马丁

I will check in Outlook (for Outlook Addin), in a meeting request (MeetingItem / AppointmentItem), the recipients when they were added.
I am searching for an event / possibility in the MeetingItem / AppointmentItem it self...
So far I have not found any event, which add to the recipients is responsible.
Can someone give me as a tip on how I should proceed?

Thank you
Martin

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

二智少女猫性小仙女 2024-10-28 16:27:42

找到了解决 ItemSend 事件的方法:

        readonly Outlook.Application _outlookApp = new Outlook.Application();

    private void ThisAddIn_Startup(object sender, System.EventArgs e)
    {
        _outlookApp.ItemSend += new ApplicationEvents_11_ItemSendEventHandler(OutlookAppItemSend);
    }

    void OutlookAppItemSend(object item, ref bool cancel)
    {
        if (item is Outlook.AppointmentItem)
        {
            var appt = item as Outlook.AppointmentItem;
            foreach (Outlook.Recipient recipient in appt.Recipients)
            {
                MessageBox.Show(string.Format("Rctp {0} ", recipient.Name));
            }

        }....

Found a way over the ItemSend event:

        readonly Outlook.Application _outlookApp = new Outlook.Application();

    private void ThisAddIn_Startup(object sender, System.EventArgs e)
    {
        _outlookApp.ItemSend += new ApplicationEvents_11_ItemSendEventHandler(OutlookAppItemSend);
    }

    void OutlookAppItemSend(object item, ref bool cancel)
    {
        if (item is Outlook.AppointmentItem)
        {
            var appt = item as Outlook.AppointmentItem;
            foreach (Outlook.Recipient recipient in appt.Recipients)
            {
                MessageBox.Show(string.Format("Rctp {0} ", recipient.Name));
            }

        }....
一曲爱恨情仇 2024-10-28 16:27:42

我已经弄清楚如何知道收件人是否已更改,该事件会在约会项目中发生任何更改时触发,但我可以使用名称进行过滤。

readonly Outlook.Application _outlookApp = new Outlook.Application();

private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
    _outlookApp.ItemLoad += new Outlook.ApplicationEvents_11_ItemLoadEventHandler(test_ItemLoad);
}

void test_ItemLoad(object item)
{
    if (item is Outlook.AppointmentItem)
    {
        var appt = item as Outlook.AppointmentItem;
        appt.PropertyChange += new ItemEvents_10_PropertyChangeEventHandler(appt_PropertyChange);
    }
}

void appt_PropertyChange(string name)
{
    MessageBox.Show(string.Format("Name: {0}", name));
    xxx
}

xxx:在这里,我想检查一下该项目的收件人(如果它已更改)。不幸的是,我不知道如何返回我的约会项目....

I have figured out how do I know if the recipients have been changed, that event fires on any change in the appointmentItem, but i am able to filter with the name.

readonly Outlook.Application _outlookApp = new Outlook.Application();

private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
    _outlookApp.ItemLoad += new Outlook.ApplicationEvents_11_ItemLoadEventHandler(test_ItemLoad);
}

void test_ItemLoad(object item)
{
    if (item is Outlook.AppointmentItem)
    {
        var appt = item as Outlook.AppointmentItem;
        appt.PropertyChange += new ItemEvents_10_PropertyChangeEventHandler(appt_PropertyChange);
    }
}

void appt_PropertyChange(string name)
{
    MessageBox.Show(string.Format("Name: {0}", name));
    xxx
}

xxx: Here I'd just like to go through now the recipients of the item, if it has changed. Unfortunately, I do not know how to get back to my Appointment Item ....

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文