none
Create an appointment using C# & EWS and set "Response Options" RRS feed

  • Question

  • How can I create an appointment using C# & EWS and set "Response Options" to "Request Responses" to false, like I can in the Outlook client


        privateem CreateAppontment(ScheduleItem scheduleitem, ExchangeService service, Appointment appointment)
            {
                
                  appointment.IsResponseRequested = false;
                  appointment.IsReminderSet = false;
                  appointment.ReminderMinutesBeforeStart = 10;


                   appointment.Save(WellKnownFolderName.Calendar);

                   // Verify that the meeting was created.
                    Item item = Item.Bind(service, appointment.Id, new PropertySet(ItemSchema.Subject));

                    return item;
            }

    Wednesday, January 24, 2018 2:06 AM

All replies

  • You need to set the PidTagResponseRequested extended property https://msdn.microsoft.com/en-us/library/office/cc839921.aspx  eg

                Appointment appointment = new Appointment(service);
                appointment.Subject = "TestApt";
                appointment.Start = DateTime.Now.AddHours(1);
                appointment.End = DateTime.Now.AddHours(2);
    
                ExtendedPropertyDefinition PidTagResponseRequested = new ExtendedPropertyDefinition(0x0063, MapiPropertyType.Boolean);
                appointment.SetExtendedProperty(PidTagResponseRequested, false);
                appointment.Save();
                appointment.RequiredAttendees.Add("user@domain.com");
                appointment.Update(ConflictResolutionMode.AlwaysOverwrite, SendInvitationsOrCancellationsMode.SendOnlyToChanged);

    Cheers
    Glen


    Wednesday, January 24, 2018 3:42 AM