none
Get an error on delete appointment operation RRS feed

  • Question

  • As per my requirement, I have to search and delete out, individual appointments on the basis of appointment Start and Body text.

    Below mentioned code works fine if I execute code in debug mode line by line, but throws an exception if try to execute same code after deployment.

    Dim clnd As CalendarFolder
    clnd = CalendarFolder.Bind(objService, New FolderId(WellKnownFolderName.Calendar, strMailBox))
    For Each _item As Item In clnd.FindAppointments(New CalendarView(dtAppointmentDate, dtAppointmentNext))
    Dim _apt As Appointment
    _apt = Appointment.Bind(objService, _item.Id)
    If (_apt.Body.Text = strApptBody) Then
    If (_apt.Start = dtAppointmentDate) Then
    _apt.Delete(DeleteMode.MoveToDeletedItems)
    End If
    End If
    Next

    Please help me out.

     

    Monday, November 28, 2011 2:19 PM

All replies