deleteTemplateBlock

deleteTemplateBlock

BASIC / ADVANCED / PREMIUM

Deletes a block of content from the Word template.

Description
public void deleteTemplateBlock(String blockName)

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$).

Parameters

blockName

The name of the block placeholder.

Code samples

Example #1

The resulting Word document looks like: