Solved

Searching Outlook 2010 Meeting Request Events c#

Posted on 2011-03-13
13
750 Views
Last Modified: 2012-05-11
I will check in Outlook (for Outlook Addin), in a meeting request (MeetingItem / AppointmentItem), the recipients when they were added.
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
0
Comment
Question by:Martin Kreis
  • 8
  • 5
13 Comments
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 35121398
SOunds like you want the item add event to the calendar folder.  Whilst i'm not C# aware, it is the outlook 'way'.  See:

http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.itemsevents_event.itemadd.aspx#Y180

Chris
0
 

Author Comment

by:Martin Kreis
ID: 35122736
Hi Chris
No, not the ItemLoad event in the Outlook Explorer, this Event i know, also how to decide if it is the right item for me.
I am searching for an event / possibility in the MeetingItem / AppointmentItem it self...

Thanks
Martin
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 35123215
Ah in that case apologies for my error, there is an item change event if you set a withevents handler but I have less than no idea how you can use it via c# or even if you can use it.

Chris

0
 

Author Comment

by:Martin Kreis
ID: 35132630
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
        }

Open in new window


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 ....

Thanks
Martin
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 35132719
Congratulations on getting that far .. it isn't the first time I have overlooked the load event!

I still don't know c# or the interop interface :o(

BUt what do you get from your appt_PropertyChange handler if you change the recipients?

Chris
0
 

Author Comment

by:Martin Kreis
ID: 35132791
Sadly, i only get the name of the Properties which has been changed...
Now, if i see, that the recipients has changed, i like to go thru this an check the Place of the recipients...

Cheers
Martin
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

Author Comment

by:Martin Kreis
ID: 35132851
It seems that not many really develop for Office or Outlook add-in ...
Not easy to find help ...
0
 
LVL 59

Assisted Solution

by:Chris Bottomley
Chris Bottomley earned 150 total points
ID: 35132856
IN test_ItemLoad you have the appointmentitem as item .. it would seem

                var appt = item as Outlook.AppointmentItem;

so can you access the item here to see the recipients?

Chris
0
 

Author Comment

by:Martin Kreis
ID: 35155933
Hi Chris
Not in the ItemLoad Event. But i try it with ItemSend event, and there i can Access to the recipients.

Martin
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 35156291
OK, if that's the case it would indicate you cannot check the recipients during the load event ... strange as it seems to me.  The mail you used to 'load' was a mail with recipients?

Chris
0
 

Author Comment

by:Martin Kreis
ID: 35187056
Hi Chris
Its not an E-Mail, its an Appointment / MeetingItem.
But for the moment, its ok to work with the ItemSend event.

Thanks
Martin
0
 

Accepted Solution

by:
Martin Kreis earned 0 total points
ID: 35187110
As example, this piece of code i use...
        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));
                }

            }
....

Open in new window

0
 

Author Closing Comment

by:Martin Kreis
ID: 35221393
Found no solution for the asked question but found an other way by self.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Office Picture Manager is not included in Office 2013. This comes as a shock to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This article explains how…
Are you unable to connect or configure Hotmail email account in Microsoft Outlook 2010, 2007? Or Outlook.com emails are not downloading to Outlook? Lets’ see the problem and resolve Outlook Connector error syncing folder hierarchy (0x8004102A).
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now