In addition to forcing the saving of documents and naming them using the SetSavedDocumentFileName command, the template author can use the
«SetSavedDocumentFolder» command in the template to have control over where the documents are stored.
Here is an example:
If the Document Save Folder set in this way is a relative folder, as with this example, then the folder configured into the Document Save Folder is prefixed in order to arrive at an absolute folder path. This example will use a Documents folder which is at the same level as the template.
«SetSavedDocumentFolder(.\Documents\<AccountNumber>)» will use the Documents folder at one level below the template folder.
Note the <> characters around ‘AccountNumber’ – these indicate that XpressDox must extract the value of the ‘AccountNumber’ data element captured for the template, and insert that value into the folder name, giving a result, in this example, of ‘Documents\A0001′ (assuming the ‘AccountNumber’ captured was ‘A0001′).
<WindowsLogonUser> is a system specified value and refers to the Windows logon name of this user. It can be included in the
«SetSavedDocumentFolder()» command. An example would be:
«SetSavedDocumentFolder(Documents\<WindowsLogonUser>\<AccountNumber>)» the result of which would be ‘Documents\Mary\A0001’.
The saving of documents can also be defined in the Configuration which would mean that the template author would not need to use this command on each template. Any Configuration settings which determine the file path of the document would be overwritten by this command on the template.
With effect from version 5.3, the command can be coded as if it were a function. The above would then be rendered: