Commands

Replace - XpressDox

Replace is used to replace all occurrences of one string in a source string with another string: «Replace(Address,"Ave.","Avenue")» “123 Long Ave., Cape Town” becomes “123 Long Avenue, Cape Town”

UpdateFields - XpressDox

When there is conditional logic in a template which removes or adds text, then some of the Word constructs such as Word fields (like page numbers and other fields) are not updated automatically. Normally user intervention is required in order to get Word to update the fields (i.e. select the...

ReplaceField and ReplaceFieldEnd - XpressDox

The use of these two commands is discussed extensively in Define layout in a base template and Implement an optional option with ReplaceField.

Required - XpressDox

Use this command when a field should not be left empty on the interview.   Command structure: «Required(AccountNumber)»   Examples of usage: Mark one mandatory field as required:«Required(AccountNumber)» Add a second parameter to the command to indicate what type of data should be entered into the required field.«Required(DateOfBirth,date)» List more...

RequiredVersion - XpressDox

Running a template on an old version of XpressDox might give rise to confusing error messages if new features are used.

RestrictToLicenses - XpressDox

The «RestrictToLicences()» command takes a list of XpressDox license serial numbers as a parameter.  Then, when the template including that command is run, XpressDox verifies that the user’s XpressDox license serial number is one of those in the list, and, if not, will not run that template. Example: «RestrictToLicenses(301,1020,1021,1022)» This...

Round - XpressDox

The Round function performs rounding.  For example: «Round(Amount)» will round the value of the Amount data element name to the nearest whole number. The Round function can take on extra optional parameter being the number of decimal places to which the number should be rounded (the default is 0).  «Round(number,3)»...

Conditional Numbering of Paragraphs

Suppose you have a document where names and other identifying information are listed.  They could be parties to a contract or names and addresses of directors of a company, or something like that. Suppose further that if there are a number of parties to be listed, the paragraphs in which...

Working with Section Breaks

Section breaks are used in Microsoft Word®  to separate different parts of the same document which typically have different attributes.  Such as different orientation (landscape or portrait) and different headers and/or footers. This becomes an issue for the template author when one or more sections are included (or excluded) from...

Rule - XpressDox

Using the «Rule()» command the template author can make sure that data values entered by the user in the interview for a template are syntactically correct and to some extent that they are consistent with each other.

Run Text Files as Templates

Because XpressDox has such a rich set of text manipulation features, it is not only ideal for traditional document assembly, but also for tasks such as generating web pages, XML and even program code. Prior to version 5 of XpressDox,  it has been possible to structure a Word document as if...

RunAsHugeTemplate - XpressDox

There is a feature (perhaps a bug) in Microsoft® Office that prevents Add-ins like XpressDox from working with very large documents.  This affects XpressDox when a template being merged ends up being about 400 or more pages long. It only occurs when the template is run inside the XpressDox desktop...

RunTemplates - XpressDox

The «RunTemplates» command enables the template author to specify that more than one template should be run. «RunTemplates(Letter,Contract,DebitOrder,FileCover)» The four templates Letter.xdtpx, Contract.xdtpx, DebitOrder.xdtpx and FileCover.xdtpx will be run, one after the other.  The user will be presented with an interview for each template being run, but each interview will...

Select templates using a master template

Selection of multiple templates to be run can be done by the user using the XpressDox explorer, but the template author can also control the selection of templates using a master template with document-selection logic built into it.

Letterheads on your templates

Letterheads: BaseTemplate is an option, but does not give you much control: When it comes to inserting letterheads on your templates, there are different techniques you could employ. Should you have a very simple letterhead, 1 header with 1 footer that do not change then the BaseTemplate command is acceptable....

RunWordMacro - XpressDox

This command enables the template author to cause XpressDox to run a Word macro after the template has been merged. «RunWordMacro(AlignParagraphs,TranslateDoubleQuotes)» The above command will cause the two named macros (i.e. AlignParagraphs and TranslateDoubleQuotes) to be run after the template has been merged. The Delay Option XpressDox needs to accommodate...

SaveAsHTML - XpressDox

XpressDox can be directed to save the assembled document as HTML by using the following command anywhere in the template: «SaveAsHTML(Yes)»

SaveAsPDF - XpressDox

In the configuration of a template folder, the “PDF” option can be specified which will cause XpressDox to create a PDF version of every template merged from that folder. Sometimes not all templates are required to be merged and saved as PDF, and only selected templates should result in PDF...

SaveAsRTF - XpressDox

The command «SaveAsRTF(Yes)» is used to instruct XpressDox to save the assembled document in RTF format.

SaveAsText - XpressDox

Sometimes you might want the result of XpressDox merging data and template to be not a Word document but another document, for example a CSV file, or even another XML document, or programming code (yes, XpressDox can be used to generate programming code, or HTML, anything really).  In all those...

SaveDataset - XpressDox

In most cases after a template is run, XpressDox will save the Data Set (i.e. the XML file containing the data). Sometimes you might want to suppress the saving of the the data set. For example this might be when all the data for the data set are sourced from...

Script Feature - XpressDox

The «Script()» command enables the template author to give a name to a chunk of text, and to use that chunk repeatedly in a template. The chunk of text can consist of from a few words to one or more paragraphs. This named chunk can then be inserted into the...

SecondsBetween - XpressDox

The fillpoint «SecondsBetween(Later,Earlier)» will return the number of seconds between the value in data element Later, and that in Earlier. For example: The race started at «ChooseUsingTimePicker(StartTime)»«FormatTime(StartTime,'hh mm tt')» and ended at «ChooseUsingTimePicker(EndTime)»«FormatTime(EndTime,'hh mm tt')». The elapsed time was «SecondsBetween(EndTime,StartTime)» seconds, which was not a new record.

Interact with External Programs

XpressDox and external programs   Using these functions:   CreateObject, GetObjectValue, GetProperty, InvokeMethod and SetProperty   it is possible to instantiate COM (Common Object Model) and .NET objects and address their methods and properties. There are a huge number of applications which are exposed via the COM mechanism, including all the...

Select/Case/Default - XpressDox

The Select, Case and Default construct is especially helpful where otherwise a series of «Else()» commands nested inside «If()» commands would be necessary. This construct is analogous to the Select/Case/Else commands in VBA ( and the switch/case/default construct in C# and similar constructs in other languages). An example would be...
Loading...