Open topic with navigation

# removeSection

The `removeSection` method removes a section from a document.

## Syntax

    removeSection( sectionNumber )

## Arguments

Argument | Description
--- | ---
`sectionNumber` | (number) A zero-based index that specifies the section to remove. For example, to remove the second section, set this argument to `1`.

## Returns

Nothing.

## Example

    -- Example that removes the last section of a document
    if document:getSectionCount() > 0 then
       local lastSection = document:getSectionCount() - 1
       document:removeSection( lastSection )
    end

© 2016 Hewlett Packard Enterprise Development LP | Send documentation feedback to HPE Close Send Documentation Feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to AutonomyTPFeedback@hpe.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_HP_HTML5_bannerTitle.htm