insert_text_block_extended

The keyword insert_text_block is deprecated. Use the statement TEXTBLOCK instead (for more information, see TEXTBLOCK statement).

The function insert_text_block_extended is an extension to the insert_text_block function (see insert_text_block). The insert_text_block function is used if Text Blocks need to be inserted in the same result document using different styles and if a Text Block needs to be inserted in a table cell.

The result of the function is of type TEXT ans is the text of the predefined Text Block.

The function has three parameters of type TEXT:

  1. The first parameter contains the label of the Text Block that needs to be inserted.
  2. The second parameter contains the prefix of the styles set that needs to be used to layout the Text Block. If this parameter is left empty, KCM searches for a styles set with the KCM prefix. For more information on the layout of Text Blocks, see TEXTBLOCK statement.
  3. The third parameter contains the paragraph sign assigned to the Text Block. You need to pass a paragraph sign declared within a table cell to insert a Text Block in a table cell. Using the wrong paragraph sign to insert a Text Block in a table cell may result in a corrupted Microsoft Word document. This paragraph can be left empty if the Text Block is not inserted in a table cell.

If the Text Blocks set the Text Block belongs to has an associated Field Set, you need to assign values to all Fields from this Field Set using a variable of type FIELDSET (see FIELDSET). Also, do so if the Text Block inserted into the result document does not use any of these Fields.

An example is provided here.

 @(insert_text_block_extended("Clauses"; "TST";""))

This example shows how the Text Block with the label "Clauses" is inserted in the result document. The styles setused has the prefix "TST".

Another example is provided here.

TEXT par := ""
@ (insert_text_block_extended("Clauses"; ""; par))

The above example shows how the Text Block with the label "Clauses" is inserted in the result document. The function needs to be called within a table cell as the paragraph sign passed in the third parameter is declared within a table cell.

To run a Master Template containing this feature, you need KCM Core or KCM Repository Server.