3
votes

I'm currently developing an application that utilises Microsoft Exchange WebServices, and I'm a little confused about the Appointment.IsRecurring property and the Appointment.AppointmentType property.

According to this article on MSDN: https://msdn.microsoft.com/en-us/library/office/dd633700(v=exchg.80).aspx, if the appointment type is not RecurringMaster, Occurrence or Exception (i.e. Single), then the appointment is not a recurring meeting.

And according to this article on MSDN: https://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.appointment.isrecurring(v=exchg.80).aspx, the IsRecurring property states whether the appointment is recurring or not.

However, I've got some code that checks if the appointment is recurring and then checks what the appointment type is:

if (appointment.IsRecurring)
{
    if (appointment.AppointmentType == AppointmentType.RecurringMaster)
    {

    }
    else if (appointment.AppointmentType == AppointmentType.Single)
    {
        //shouldn't happen
    }
    else if (appointment.AppointmentType == AppointmentType.Occurrence || appointment.AppointmentType == AppointmentType.Exception)
    {

    }
}

For some reason I have come across a number of appointments that are flagged as IsRecurring, but their appointment type is AppointmentType.Single.

Would anyone here be able to point out why I'm facing this "problem",where according to one property it's a recurring meeting and according to the other it isn't?

I've created a recurring meeting, changed one instance of the meeting, and checked the type, but it rightly comes up as AppointmentType.Exception.

I'd appreciate all of your input/guidance regarding this matter.

Cheers.

Kevin

1

1 Answers

0
votes

My apologies, I can't speak to the actual reasons this occurs, but in my testing if I'm in the Outlook Calendar GUI and I copy one instance of a recurring meeting by holding down the CTRL key and click and drag it, the result is a non-recurring copy of that specific appointment, but for some reason the copy still retains the IsRecurring flag and the AppointmentType is Single.

So, this isn't the reason behind it, but could be a cause of part of what you're seeing. I agree it seems odd.