none
EWS Managed API: How to create an appointment instead of a meeting? RRS feed

  • Question

  • I want to create an appointment but I get a meeting instead. I use this code:

    using Microsoft.Exchange.WebServices.Data;

    Appointment appointment = new Appointment(service);
    appointment.Subject = subject;
    appointment.Start = DateTime.Parse(StartDate);
    appointment.End = DateTime.Parse(EndDate);
    appointment.IsReminderSet = false;
    appointment.Save();


    When I open this appointment in Outlook it is a meeting request instead of a normal appointment.

    What do I do wrong? Can somebody help me create a normal appointment. Please.

    Regards,

    Stig Wulff Christensen


    Stig Wulff
    Tuesday, March 29, 2011 7:55 PM

Answers

  • In your Save method make sure you set

    Appointment.Save(CalendarFolder.Id,

    SendInvitationsMode.SendToNone);

    Without the SendInvitationsMode.SendToNone EWS will create a meeting don't ask me why but it caught me out this week as well.

    Cheers
    Glen

    Thursday, March 31, 2011 2:51 AM

All replies

  • In your Save method make sure you set

    Appointment.Save(CalendarFolder.Id,

    SendInvitationsMode.SendToNone);

    Without the SendInvitationsMode.SendToNone EWS will create a meeting don't ask me why but it caught me out this week as well.

    Cheers
    Glen

    Thursday, March 31, 2011 2:51 AM
  • Hi Glen

    It works. Thanks.

    Cheers

    Stig


    Stig Wulff
    Friday, April 1, 2011 6:22 PM