none
Outlook 2013: Function cannot be performed because the message has been changed RRS feed

  • Question

  • I'm working on a C# Outlook plugin that saves some data to the MailItem. 

    mailItem.PropertyAccessor.SetProperty(TrackedPropertySchema, true);
    mailItem.Save();

    Everything is working great, but if you try to modify the email afterwards by clicking on "flag for followup" or putting a category on the email, Outlook shows a message "The function cannot be performed because the message has been changed." Am I missing something after my code modifies the MailItem? Thanks in advance!

    Monday, December 31, 2018 4:11 PM

All replies

  • Hi,

    Thanks for visiting our forum. Then here we mainly focus on general issues about Office desktop client. As your query is related to using code in Outlook, I'll move your thread to the dedicated MSDN forum for Outlook

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

    Regards,

    Yuki Sun


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Tuesday, January 1, 2019 5:42 AM
  • When is that code executed? Keep in mind that after a message is saved for the very first time, Exchange can add its own extra properties, causing a change on the server side which is then replicated to the client side thus causing a conflict.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Friday, January 4, 2019 10:32 PM
  • Hi, thanks for your response! That code is executed at the user's request - we've added a 'Track' button in the ribbon, which marks the selected email as 'Tracked' (and saves that flag to the MailItem itself). Part of the user's workflow is to then flag and/or categorize the email, which is when they get the notification that the function cannot be performed because the message has been changed.

    Tuesday, January 8, 2019 3:06 PM
  • Hi Dmitry, do you know of a way around this? Does it have to do with the way I'm saving the property to the email?
    Wednesday, January 16, 2019 1:16 PM
  • No, it is a question of when, not how. Just bad timing. Is setting the property prior to saving it for the very first time an option?

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Wednesday, January 16, 2019 3:05 PM
  • That order is part of the user's typical workflow - they usually flag the email for follow-up or categorize it after they mark it as 'Tracked' using our plugin. If there's no good way around this issue, we can try to educate them on doing it in the reverse order. Thank you for your response!
    Wednesday, January 16, 2019 3:09 PM