The SetSavedDocumentNameVersioning Command

The SetSavedDocumentNameVersioning Command

By default, when a merged document is saved by XpressDox, the folder in which it is saved is first searched for any files which have a name similar to the newly merged document’s name. If any are found, then XpressDox makes sure that the new merged document is saved with a unique name. This is done by providing a tie-break digit just before the extension.

For example, if the potential file name for a merged document is CoveringLetter.xml, and there is already a document with that name, or even a document with the same name except for the extension (e.g. CoveringLetter.pdf), then XpressDox will construct a name like CoveringLetter.1.xml. Or, rather it will construct the name CoveringLetter.1.xml and then test for the occurrence or that name (essentially checking for whether that document exists with that tie-break number), and so on, increasing the tie-breaker by one until a unique name is found.

After a time, if the same template is merged and results in the same file name in the same folder a number of times, then there will be a number of documents named CoveringLetter.1.xml, CoveringLetter.2.xml, CoveringLetter.3.xml, and so on.

It may be that this default behaviour is not desired, and that a merged document should replace any previously saved document with the same name. The following command placed into the template will achieve this: