removeSection

removeSection

ADVANCED / PREMIUM BASIC

Removes a section and its contents.

Description
public void removeSection(String source, String target, Integer section)
public void removeSection(String source, String target, Integer section, Boolean keepSections)

This method allows you to remove a section and its contents in a Word document.

Parameters

source

Path to the Word document.

target

Path to the resulting document.

section

Section number to be removed: 1, 2...

options

The possible keys and values are (required options are shown with yellow background):

Preserve or not the original sections of the splitted document. If false uses the first section for all documents

Code samples

Example #1