In any document management solution, it's important that each new document adhere to organizational standards. This is especially true when metadata is being used to drive business processes. Even with a well-defined set of metadata fields and established guidelines for filling them out, busy knowledge workers often forget to provide this information because they are too focused on the document content. If the metadata is incomplete or inconsistent, then automated business processes that depend on it will fail. This leads to inefficiency and additional costs associated with finding and correcting the missing data.
Windows SharePoint Services 3.0 provides an enhanced callback mechanism that enables solution developers to control the document creation process and take prescriptive action based on the current state of the document. By implementing event receivers, you can write custom code that is called during document creation.
Document creation occurs in three stages:
The document template is opened in the appropriate editor program. The user edits the content and metadata and then saves the document into the library,
SharePoint retrieves the metadata and places it in a property bag, which it passes to the ItemAdding event receivers that have been registered for the library.
Unless one of the ItemAdding receivers cancels the document as noted below, SharePoint uses the properties to construct a new document list item, which is then added to the library. ...