Custom properties of appointments on shared calendars having trouble synchronizing: "The function cannot be performed because the message has been changed" RRS feed

  • Question

  • Hi,

    We have a timesheet add-in for Outlook that adds a form region to the Appointment form.  It saves data into custom properties of the open appointment.

    We have an issue when sometimes a user will make a change to the data in an appointment on another user's shared calendar and the change will save on that user's computer, but it will not synchronize to the Exchange server (we are using Exchange 2007).

    Going into the user's Sync Issues folder, we find Synchronization Logs that contain the following:

    8:54:20 Synchronizing server changes in folder 'Joe Canterro - Calendar'

    8:54:20 Downloading from server ''

    8:54:21    1 view(s)/form(s) updated in offline folder

    8:54:21 Error synchronizing folder

    8:54:21                   [80040109-50A-80040109-560]

    8:54:21                   The function cannot be performed because the message has been changed.

    8:54:21                   Microsoft Exchange Information Store

    8:54:21                   For more information on this failure, click the URL below:


    Is there a way to force synchronization, where we can get the add-in to choose which data overrides which?

    Wednesday, February 11, 2015 6:13 AM


All replies

  • How/when do you save the appointments?

    Dmitry Streblechenko (MVP)
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Wednesday, February 11, 2015 6:34 AM
  • Hi Dmitry,

    We have a sub-routine that saves the entered in data that looks like this:

     Sub SaveTimeEntry(ByVal CurrentTimeEntry As TimeEntry, ByVal objAppointment As Outlook.AppointmentItem)
            Dim userProp As Outlook.ItemProperty
                '======== JOB TYPE ======== 
                If (objAppointment.ItemProperties("JobType") Is Nothing) Then
                    userProp = objAppointment.ItemProperties.Add("JobType", Outlook.OlUserPropertyType.olText, False, False)
                    userProp = objAppointment.ItemProperties("JobType")
                End If
                userProp.Value = CurrentTimeEntry.JobType
    '.... Save some more properties, in the same fashion to Job Type above (excluded from code sample)
                If objAppointment.Saved = False Then
                    MsgBox("Error Saving Changes!")
                End If
            Catch ex As Exception
            End Try
        End Sub
    Where TimeEntry is a structure we use to store the additional data.

    The appointments are saved in a number of places in the code.  Part of the add-in is a textbox and a button, where a manager can enter a passcode into the textbox and then click the button to say that they have approved that user's appointment (it's only used if the appointment is vacation or sick leave).

    The first place the appointment is saved is in the FormRegionShowing event, where if the appointment has been approved, then it checks that the appointment's start time is the same as what it was when it was approved, to ensure that it is not a copy of an appointment that has been approved.  If it is a copy of an approved appointment, the approval is removed and at this point, the appointment is saved.

    The second place where the appointment is saved is if the manager clicks the approval button.

    The third place it is saved is in the FormRegionClosed event.

    Thursday, February 12, 2015 12:59 AM
  • Hi Eugene,

    I looked over those sites, but they do not seem relevant.  They are to do with an issue sending email due to a bug in either Outlook or their anti-virus. 

    My issue is to do with when there really may have been multiple users changing an appointment at the same time and I want to make sure, via my add-in, which data gets merged/synchronised with the data on exchange.

    Thursday, February 12, 2015 1:05 AM
  • Avoid saving the appointment multiple times - I have seen cases where an appointment is saved on the client side, the cached store pushes the changes to the server, server tweaks the appointment, and the change is downloaded back to the cached store. If you keep the appointment open and try to save it again, you will receive the exact conflict error that you are receiving.

    Dmitry Streblechenko (MVP)
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Thursday, February 12, 2015 1:16 AM
  • Thanks Dmitry.  I'll play around with that and let you know how I go.
    Thursday, February 12, 2015 6:50 AM
  • It looks like you change Outlook items too often.
    Thursday, February 12, 2015 12:55 PM
  • I agree, that the add-in does save too much.   I’ll take out the first two saves and just leave the one in the FormRegionClosed event.

    However even when all three of those saves occurred, it did not always result in that error.  It only happened haphazardly.   

    Even when I don't get the synchronizing folder error, I still have an issue where if one user has the appointment open on their computer and another one has it opened at the same time, one user’s changes overwrites the other (obviously).  I want to be able to control which values get overwritten, based on the values in both versions.

    Users will have an item called Modification Resolution in their Sync folder, which looks a bit like the following (but with more properties):

    18:07:14 Message class: {SU:IPM.Appointment}

    18:07:14 Appointment Conflict Resolution

    18:07:14 Local subject: {SU:Annual Leave}

    18:07:14 Remote subject: {SU:Annual Leave}

    18:07:14 Local Message Entry ID: {CB:70, LPB:0x0000000060B45A160A44B54CB938B0010B6703E807001D605EC55EE1D542AC97E4AA15F1B0A100000002815F00005D47A51FB83FF0408004EEF822840CF502B5A81714EA0000}

    18:07:14 Remote Message Entry ID: {CB:70, LPB:0x0000000060B45A160A44B54CB938B0010B6703E807001D605EC55EE1D542AC97E4AA15F1B0A100000002815F00005D47A51FB83FF0408004EEF822840CF502B5A81714EA0000}

    18:07:14 Local Message ChgKey: {CB:22, LPB:0x565B6F7B48911344A8E9BE511E66D2F102F4830EB44D}

    18:07:14 Remote Message ChgKey: {CB:22, LPB:0x565B6F7B48911344A8E9BE511E66D2F102F4830EC727}

    18:07:14 Local Message PCL: {CB:44, LPB:0x142AC902340929BF48A5BC24D25239F1900002745316565B6F7B48911344A8E9BE511E66D2F102F4830EC727}

    18:07:14 Remote Message PCL: {CB:44, LPB:0x142AC902340929BF48A5BC24D25239F1900002745316565B6F7B48911344A8E9BE511E66D2F102F4830EC727}

    18:07:14 Checking local modifications

    18:07:14 Compare named property: JobType

    18:07:14 Getting remote properties

    18:07:14 Checking remote modifications

    18:07:14 Compare (conflict) named property: JobType

    18:07:14 Local: {SU:Annual Leave}

    18:07:14 Remote: {SU:Public Holiday}

    18:07:14 Not equal (conflict) named property: JobType

    18:07:14 Critical properties merged into remote item.

    18:07:14 Successfully auto-resolved

    Is there any way to control how conflicting properties get merged?  It seems kind of random at the moment.

    • Edited by Noraa2 Friday, February 20, 2015 7:35 AM Typo
    Friday, February 20, 2015 7:33 AM
  • Outlook (nor VSTO) doesn't provide anything for that. I'd suggest asking such questions on the Exchange Server Development  forum instead.
    Friday, February 20, 2015 2:36 PM
  • Hi,

    Did you find any solution for this ?.

    I am experiencing the same while adding user properties to the mails in Shared mailboxes.

    Thanks in advance


    Wednesday, October 7, 2015 8:20 AM