Word Append Paragraph
Word Append Paragraph
Section titled “Word Append Paragraph”Type: word-append-paragraph · Package: Word Activities v1.0.4
Appends a paragraph to the end of the document, with an optional style. It is the basic building block for documents: the title, section headings and body text.
How it works
Section titled “How it works”Adds text as a new paragraph at the end of the document body, applying the given style (see styles). It only works inside a session (Word Create or Word Open); the change stays in memory until the document is saved.
- The text is written as is, spaces included. An empty
textadds a blank paragraph. - The style is assigned by its identifier (
Heading1,Title…). The final look depends on the document defining that style: documents made in Word include it; in a document without that style defined, the paragraph shows with normal formatting. For controlled formatting, start from a template opened with Word Open. styleis picked from the list; it does not accept expressions.
Required parameters
Section titled “Required parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
text | string | — | The paragraph text. Supports expressions. |
Optional parameters
Section titled “Optional parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
session | ZoanWordSession | — | Word session. Inherited automatically inside a body. |
style | string | "Normal" | Paragraph style: Normal · Title · Heading1 · Heading2 · Heading3. |
Output
Section titled “Output”This activity does not return a value.
Example
Section titled “Example”Word Open path = asset("report_template.docx") └─ body: Word Append Paragraph text = "Audit Report" style = Title Word Append Paragraph text = "1. Summary" style = Heading1 Word Append Paragraph text = "We reviewed " + total + " records." Word Save path = "C:/reports/report.docx"Common errors
Section titled “Common errors”| Message | Cause and fix |
|---|---|
'session' must be a valid Word session (use word-open or word-create). | The activity is outside a Word Create/Word Open body and got no session. |
Related activities
Section titled “Related activities”- Word Append Table — append a table.
- Word Insert Image — insert an image.
- Word Create — create the document that receives the paragraphs.