问题
We have a document list that contains Excel sheets, the documents that are in the list have to be processed. The processing code is triggered by the EventReceiver.
Until know we used the ItemCheckedIn event, but this isn't triggered when the user just saves a document from within Excel. I have tried to use the ItemUpdated event, but that doesn't seem to work either.
So I'm wondering whether there is an event that is triggered when a user saves the document from within Excel.
回答1:
There are Before and After events when updating/adding list items. Here is a comprehensive list of all of those events:
Before Events
- ItemAdding
- ItemUpdating
- ItemDeleting
After Events
- ItemAdded
- ItemUpdated
- ItemDeleted
- ItemAttachmentAdded
- ItemAttachmentDeleted
- ItemCheckedIn
- ItemCheckedOut
- ItemFileConverted
- ItemFileMoved
- ItemUncheckedOut
回答2:
ItemAdded?
It's a little confusing since one event handler gets called when the document is initially saved and ItemUpdated gets called when you set any custom properties on the item, at least if you're using the default SharePoint web UI.
来源:https://stackoverflow.com/questions/1707634/what-event-is-triggered-when-a-document-is-saved-in-a-document-library-in-sharep