Open topic with navigation

# setContent

The `setContent` method sets the content (the value of the `DRECONTENT` field) for a document or document section.

## Syntax

    setContent( content [, number] )

## Arguments

Argument | Description
--- | ---
`content` | (string) The content to set for the document or document section.
`number` | (number) The document section to modify. If you do not specify a number, the method modifies the active section. For the document object passed to the script's `handler` function, the active section is the first section (section 0). If you specify a number greater than the number of existing sections, additional empty sections are created.

## Examples

    -- Set content for section 0
    document:setContent("content0")

    -- Get document for section 1
    local section = document:getNextSection()

    -- Set content for section 1
    section:setContent("content1")

    -- Set content for section 7, and assign sections 2-6 to
    -- empty string if non-existent
    document:setContent("content7", 7)

© 2018 Micro Focus or one of its affiliates | Send documentation feedback to Micro Focus 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 swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm