DocGenericEvent_BeforeReplaceContent event
Occurs before a user replaces the content of documents.
Syntax
DocGenericEvent_BeforeReplaceContent(Batch, SourceFile)
Name | Description |
---|---|
Batch |
An object that represents the batch of documents the user has selected. |
SourceFile |
A string containing the name of the source file selected by the user to replace the document’s content. |
Remarks
Importing a document using drag and drop on a released document will create a new revision. Depending on your organization’s business process for this action, the document might need to be placed in different workflow state, for example, for review before the new content can be released. We recommend that you do that in this event. If this event handler is not customized, an Access is denied error will result and the action will fail. If the document should remain in the released state after the import, this event handler should still be implemented to place the document in a different workflow state and then the document released in the DocGenericEvent_AfterNewDocument event handler.
By default, the redlines for the existing document content will be deleted when the content is replaced. If the redlines should be retained (to check that changes to the document have been done properly, for example), you can prevent the redlines from being deleted by setting the AS_CONFIRM_CLEANREDLINESONREPLACECONTENT constant to False in this event. The default is True.