1
votes

I have an application that syncs appointments between Outlook and my application. The syncing code uses Redemption to update the appointments in Outlook.

When an appointment is added in Outlook, my code catches the item added event, generates an equivalent appointment in my application, and adds my appointment ID as a user property in the Outlook appointment then saves it.

The strange problem I'm having is this:

  1. Single click on a day in the month view
  2. Text box shows in the day block, type in the subject, then hit Enter
  3. Double click the new appointment to open it right away
  4. Make some changes such as setting a reminder
  5. Hit save button

At this point, the Outlook will show me a message box saying "The item cannot be saved because it was changed by another user or in another window."

I find this happening quite often if I have my appointment syncing add-in enabled, but never happens if I disable it.

It almost looks like Outlook detects the change of my code saving the user property via Redemption and doesn't like it.

Is this because Redemption is accessing to the MAPI table directly to save the data, while Outlook still caches the appointment COM object when I open it too quickly. So that the appointment I opened is "outdated" by the time I want to save it again?

The Outlook version I'm testing against is Outlook 2016.

1

1 Answers

1
votes

This error is returned if the following happens:

  1. Your code (or Outlook) opens the item
  2. Redemption opens the item
  3. Redemption modifies the item
  4. Redemption saves it
  5. Outlook (or your code) modifies and saves the Outlook item

You can either make sure Outlook does not open the item in #1 or (if it is already opened) you can piggyback on the Outlook item and open it using RDOSession.GetRDOObjectfromOutlookObject at step #2.