IMAP Connector 24.2

# 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)

Copyright 2024 Open Text
Version 24.2 | Last updated March 2024

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: IDOL IMAP Connector 24.2

Topic Title: setContent