Letterheads are of special interest because they are used as the basis for many documents. With XpressDox it is possible to create one letterhead template, and by referring to it with the
BaseTemplate command, use that template as the basis for many other documents without having to specify the letterhead formatting in those documents.
A very simple sample letterhead would look like this:
Supposing this template is stored as ‘Letterhead.xdtpl’, then an example of a template using this as the base template, called the ‘source template’, would look like:
We note that your account is now overdue by an amount of
Please make sure that payment is made forthwith.
a. By default, the entire content of the source template excluding the paragraph containing the
BaseTemplate fillpoint will be inserted into the letterhead’s
<<DocumentBody>> fillpoint. The resulting template is called the ‘destination template’.
b. The ‘BalanceOutstanding’ fillpoint in the source template will be included in the destination template. Data elements for all the fillpoints on both the source template and the base template, that is the letterhead, will need to be in the data set for the destination template.
Using data element values to construct the base template name
Note that this feature is available only in Version 4 and later of XpressDox.
The file name provided to the BaseTemplate command can be built up from constant text and also the contents of data element names.
An example would be
The data for those data element names (in this example, PageSize) cannot be sourced from data captured in the XpressDox interview, as the command itself is executed before the interview is prepared. The data elements are, then, sourced from the Standard Data which is either in the user’s Home Configuration or in the configuration of the folder from which the main template is being run, as well as the Shared Settings configuration (either the Standard Data or a data source which is designated for use as Standard Data), and also any data sources which are designated “Use for all templates”. Please see the article Configuration for folder settings for information on configuration.