deleteBlock

deleteBlock

BASIC / ADVANCED / PREMIUM

Deletes a block of content from the Word document.

Description
public deleteBlock (string $blockName [, array $type])

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 document 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

blockName

The name of the block variable.

type

Delete type: block (default) or inline.

Code samples

Example #1

The resulting Word document looks like: