none
UserProperties throws exception x8C520009 RRS feed

  • Question

  • while trying to iterate through a list of Outlook.MailItem objects, I get the following exception when I call UserProperties on the object:

    System.Runtime.InteropServices.COMException (0x8C520009): One or more items in the folder you synchronized do not match. To resolve the conflicts, open the items, and then try this operation again.

       at Microsoft.Office.Interop.Outlook._MailItem.get_UserProperties()

    If I try to move this object to the Deleted folder so I can purge the item from Outlook, I get the following exception:

    System.Runtime.InteropServices.COMException (0x80020009): One or more items in the folder you synchronized do not match. To resolve the conflicts, open the items, and then try this operation again.

       at Microsoft.Office.Interop.Outlook._MailItem.Move(MAPIFolder DestFldr)

    What can I do to fix this object?

    Wednesday, April 10, 2013 11:55 PM

Answers

  • Hi,

    It might be because of unreleased COM objects.

    For example: you have a reference to a MailItem and you have done some changes on this Item (programmatically). later, without releasing the item, you created another reference to the MailItem, and you try to read\move it. 

    I would start with cleaning the code, removing some lines and logic, see that the issue is gone, and then start adding the code back.

    Moshe


    Thursday, April 11, 2013 12:14 PM
  • I'm not familiar with such tool. 
    In my code, I have added a logging (optionally) to report the counter values after a COM object is being released.

    On which Outlook does it happen to the customer?
    If it's OL2007, we've noticed here that some COM references bugs are gone after applying SP2 or SP3.
    Another idea - working on the same mailbox items from 2 machines may also lead to this error (secretary-manager, laptop and desktop).

    Sunday, April 14, 2013 6:24 AM

All replies

  • Hi,

    It might be because of unreleased COM objects.

    For example: you have a reference to a MailItem and you have done some changes on this Item (programmatically). later, without releasing the item, you created another reference to the MailItem, and you try to read\move it. 

    I would start with cleaning the code, removing some lines and logic, see that the issue is gone, and then start adding the code back.

    Moshe


    Thursday, April 11, 2013 12:14 PM
  • Thank you for the answer.

    This problem is happening at a customer site and we can't reproduce it in house, so I can't be testing by removing lines and logic and adding things back in.

    Is there some kind of tool or method by which I can tell if unreleased COM objects is the problem in the code?

    Thursday, April 11, 2013 6:45 PM
  • I'm not familiar with such tool. 
    In my code, I have added a logging (optionally) to report the counter values after a COM object is being released.

    On which Outlook does it happen to the customer?
    If it's OL2007, we've noticed here that some COM references bugs are gone after applying SP2 or SP3.
    Another idea - working on the same mailbox items from 2 machines may also lead to this error (secretary-manager, laptop and desktop).

    Sunday, April 14, 2013 6:24 AM
  • Thank you for the suggestion about versions and SPs.

    We will ask the customer.

    Monday, April 15, 2013 11:30 PM
  • Hi ,

    I temporarily marked the replies as answers. You can unmark them if they provide no help.

    Please feel free to let us know if you need any further help.

    Have a nice day.


    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, April 25, 2013 2:10 AM
    Moderator