none
Appointment gets converted to meeting after calling update RRS feed

  • Question

  • Hi,

    when I use EWS to alter the body text and call update to save the changes, the appointment gets converted to a meeting. Any idea how to fix this?

    This is the code I'm using:

            For Each Appointment In service.FindItems(folderID, ItemView)
                Appointment.Load()
                If Not Appointment.Body.Text Is Nothing And Appointment.Body.BodyType = BodyType.Text Then
                    Appointment.Body.BodyType = BodyType.HTML
                    Appointment.Body.Text = "<head></head><html><body><font face=""Calibri"" size=""2""><span style=""font-size:11pt;"">" & Appointment.Body.Text & "</span></font></body></html>"               
                    Appointment.Update(ConflictResolutionMode.AlwaysOverwrite)
                End If
            Next

    Frank

    Thursday, March 13, 2014 11:55 AM

Answers

  • You need to specify the SendInvitationsOrCancellationsMode otherwise the Managed API will fill this in for you using SendToAllAndSaveCopy which is what is causing the problem (on 2013 anyway).

    appointment.Update(ConflictResolutionMode.AlwaysOverwrite, SendInvitationsOrCancellationsMode.SendToNone);

    Cheers
    Glen

    • Marked as answer by FrankWater Sunday, March 16, 2014 12:56 AM
    Friday, March 14, 2014 2:39 AM

All replies

  • You need to specify the SendInvitationsOrCancellationsMode otherwise the Managed API will fill this in for you using SendToAllAndSaveCopy which is what is causing the problem (on 2013 anyway).

    appointment.Update(ConflictResolutionMode.AlwaysOverwrite, SendInvitationsOrCancellationsMode.SendToNone);

    Cheers
    Glen

    • Marked as answer by FrankWater Sunday, March 16, 2014 12:56 AM
    Friday, March 14, 2014 2:39 AM
  • Thanks, that did the trick. It's working now.

    Frank.

    Sunday, March 16, 2014 12:56 AM