Managing Template Selection via Event Scripts
The template dialog for enaio® client can be managed using the 'BeforeOpen' event.
Script control offers the following options:
- Filter templates
Only templates whose names contain a string are offered:
- You can specify whether the name begins with the string or ends with the string, or whether the string is contained in the name.
- In addition, you can specify that the character string is not displayed as part of the name.
- Specify template
The template is specified; the template dialog is not opened.
- Control options
Only the 'Create new' option is active in the template dialog; the 'Copy from file' and 'Move from file' options are disabled.
- Disable selection
The template dialog is not opened; a document without pages is created.
The script is not executed if a document is added using drag and drop.
The filter and template default apply to the templates assigned to the user.
User-specific template filters are not available in the template dialog for script control.
Script Syntax for Filters
WriteProfString "GLOBALS", "TEMPLATEFILTER", "<filter>", osfile
asfile.ResultCode = 1>
asfile.WriteToFile
Filter Syntax
Filter |
Description |
---|---|
String |
The template named string is fixed. The template dialog will not be opened. |
Control character $ |
Filter |
$String |
Filter for templates that begin with the string. |
string$ |
Filter for templates that end with the string. |
$string$ |
Filter for templates that contain the string. |
Control character $ |
'$' instead of '#': Filter and hide the string in the name. |
Control character !+ |
Options: All options are available (default). Example: #excel!+ |
Control character !- |
Options: Only the 'Rebuild' option is available. Example: #excel!- |
Script Syntax for Disabling the Template Dialog:
WriteProfString "GLOBALS", "SKIPCONTENT", "TRUE", osfile
asfile.ResultCode = 1
asfile.WriteToFile
Creates a document without pages.