W-Template Selection via Event Scripts
The template dialog for enaio® client can be managed using the 'BeforeOpen' event.
Script control offers the following options:
-
Filtering 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.
-
Specifying templates
The template is specified; the template dialog is not opened.
-
Controlling options
Only the 'Create new' option is active in the template dialog; the 'Copy from file' and 'Move from file' options are disabled.
-
Disabling selections
The template dialog is not opened; a document without pages is created.
The filter and template default apply to the templates assigned to the user.
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.