0

What event receiver is triggered when the content of an existing Word document is updated/changed? ItemUpdated works when the properties on the document are updated (e.g. changing a content type column on the item/document causes ItemUpdated to get called).

3 Answers 3

0

Both the ItemUpdating and ItemUpdated event receivers get called when you update a document in a document library.

1
  • The event receiver works when I update properties on the document. I am updating/changing the document name (i.e. item["Name"]). Is this even possible if the Word document is open? When I "upload" the document the code in the event receiver works fine. The document name is changed by the event receiver on uploaded documents. Would the same code/event receiver work if the document exists in the document library, I click to open it, and Word launches. When I hit "save" in Word I am expecting the event receiver to be called and, therefore, the document name to be updated/changed.
    – obautista
    Commented Mar 5, 2013 at 22:11
0

The event receiver should work even when you update any changes to the corresponding documents as the code is written under Item Updating. You can check it by enabling the Versioning of the documents. Try to check weather the version of the document changes when you update every time. If version changes... then its sure that event receiver is fired there...

0

This thread was very helpful: file rename

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.