Document-Level Events |
To enable VBScripting for document-level events
|
|
All of the available document event scripts are listed under Document Events in the Script pane. When you select an event and then create a script in the Editor pane, the script runs when the event occurs. For example, if you select OnOpen and then write a script for it, that script runs when the document is opened.
OnOpen: Runs the script when the document is opened.
OnSave: Runs the script when the document is saved.
OnClose: Runs the script when the document is closed.
OnPrintJobStart: Runs the script when you send your document to the printer.
OnNewRecord:
OnSerialize:
OnIdenticalCopies: Runs the script for every printed item, even if it is a copy.
OnPrintJobEnd: Runs the script at the completion of a print job.
OnPrintJobCancel: Runs the script when a print job is cancelled before it is completed.
Although Procedures for Document Events appears in the Script pane under Document Events, it is not really an event at all. This item is a collection of VBScript functions and subroutines that you write, which can be used by the scripts that you create for genuine document events. For more information, refer to Procedures.