LiveDocx uses the standard merge field format supported by MS Word 2003 and 2007. It is the mail merge field format that is stored in the RTF, DOC or DOCX format.
The following standard fields of MS Word are supported:
| MERGEFIELD |
This is the standard MERGEFIELD of MS Word. This field will be merged with the appropriate data field of the given data source.
{ MERGEFIELD FieldName [Switches]}
|
(none)
Uppercase
Lowercase
First capital
Title Case
Text to be insert before
Text to be insert after
|
| IF |
This is the standard IF field of MS Word. This field compares two values and then inserts the text appropriate to the result of the comparison. |
|
| DATE |
This is the standard DATE field of MS Word. It inserts the current date. |
|
A MergeBlock is a region in a document that will be repeated in the merge process. A MergeBlock consists of two consecutive document targets, i.e. bookmarks in MS Word, with special names. These blocks must not be nested. The following illustration shows these targets and their names in red in detail:
The format of the target name is as follows:
blockStart_ + unique name
blockEnd_ + unique name
Sample:
blockStart_block1
blockEnd_block1
The content of this block is repeated based on the number of DataRows contained in the passed DataTable. A merge block can consists of all elements in the floating text, including tables or images that are inserted inline with text.
The beginning and end of a repeating block must be in the floating text or inside the same table cell. Additionally, a complete table row of the most outer table can be part of the repeating block.