RequiredAttendees Property Changed Event

B

BigDubb

I have noticed that the PropertyChange Event fires everytime a new recipient
is added to an Meeting/Appointment. Which makes sense, however, the problem
that I seem to be encountering is that the event fires everytime for every
recipient for every recipient..

i.e. I have an appointment with three recipients (Jane Doe; Jack Black; Tom
Test; George W)

The PropertyChange event fires off 16 times (recipeints.count *
recipients.Count)

Does anyone have any ideas on how I might go about trapping on this to only
allow it to run one time per update?

Thanks.
 
K

Ken Slovak - [MVP - Outlook]

Many Outlook UI properties, such as FirstName for example, end up firing
PropertyChange more than once because they actually change more than one
property. Changing FirstName would also change FullName and other properties
that depend on FirstName. The same is occurring with your code.

You can evaluate the Name property to see what's being changed. Then you can
set a flag to indicate that a property was changed and to let you decide if
you want to respond to that event. If you know ahead of time which property
you are interested in and how many times PropertyChange() fires when that
property is changed you can just count the times that PropertyChange() has
fired and do something in the event handler when you want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top