R – Data disappearing after ItemUpdate in Sharepoint with Office 2007 documents

eventshandlersmosssharepoint

I have a simple event handler with a ItemAdding event that changes a column value that I need in the ItemUpdated method. After uploading a word 2007 document (*.docx, *.pptx or xlsx) the value of the column is changed, but when I protect the document the value of the column disappears in the ItemUpdated method. This only happens for office 2007 documents, other files don't clear the value.

The event handler runs in a document library in MOSS 2007.

Thanks

Best Answer

We have the same issue. It appears that the properties from the list are added to the office 2007 doc, but only with the default values for the field on upload/creation. Once the item is edited we are experiencing that the office documents values are overriding the values set in our event handler.

We do not experience this when using an asynchronous event handler, but the asynchronous event handler has conflicts with updates on other threads with certain types of updates.

We have a support call active with Microsoft about this very issue. They acknowledge this is not No results yet.

Try using an asychronous event handler (it runs a little bit later than the code that updates from the office document), but with caution.

UPDATE:

A workaround is setting the SPWeb.ParserEnabled to FALSE will remove the connection to the document properties which will stop the above behaviour. It prevents the list properties from being added to the office document.

Related Topic