deleteTemplateBlock

deleteTemplateBlock

BASIC / ADVANCED / PREMIUM

Deletes a block of content from the Word template.

Description
public deleteTemplateBlock (string $varName)

The BLOCK variables are wrappers of content. They are used to remove unwanted parts of the document on “run time”.

This method does exactly that: removes a block of content from the Word template that has been previously enclosed between BLOCK tags ($BLOCK_varName$), or any other custom block prefix using setTemplateBlockSymbol.

Please refer to the Tutorial for a detailed description of the process.

Parameters

varName

The name of the variable.

Code samples

Example #1

The resulting Word document looks like: