Skip to main content

Add Text

Adds a paragraph of text to the Word document with specified formatting options. The text is appended to the end of the document as a new paragraph.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing the node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If ContinueOnError property is true, no error is caught when the project is executed even if Catch node is used.

Input

  • File Descriptor - File descriptor ID from the Open Word node. Default variable is word_fd.

  • Text - Text content to add to the document. Can include multiple lines and special characters.

  • Font Size - Font size in points (e.g., 12, 14, 16). Must be greater than zero.

  • Font Name - Name of the font to use (e.g., Times New Roman, Arial, Calibri, Courier New). Default is Times New Roman.

  • Space After - Space in points to add after the paragraph. Use 0 for no spacing, or positive values like 6, 12, 24 for spacing. Default is 0.

Use Cases

  • Adding body text to reports and documents
  • Inserting dynamic content into Word templates
  • Creating multi-paragraph documents programmatically
  • Appending text with custom formatting
  • Building documents with mixed font styles

Example

Adding formatted text to a document:

  1. Use Open Word to open the document
  2. Add the Add Text node
  3. Configure the inputs:
    • File Descriptor: word_fd
    • Text: This is a sample paragraph with custom formatting.
    • Font Size: 12
    • Font Name: Arial
    • Space After: 6

Building a Document Example

// First paragraph - Introduction
// Text: "Executive Summary"
// Font Size: 14
// Font Name: "Arial"
// Space After: 12

// Second paragraph - Body text
// Text: "This report provides an overview of the quarterly results..."
// Font Size: 11
// Font Name: "Calibri"
// Space After: 6

// Third paragraph - More content
// Text: "Key findings include improved revenue and customer satisfaction."
// Font Size: 11
// Font Name: "Calibri"
// Space After: 6
tip

Use Space After to control spacing between paragraphs. A value of 6 provides single spacing, while 12 creates double spacing.

Font Size Guidelines

  • 8-10 pt - Small text, footnotes
  • 11-12 pt - Standard body text
  • 14-16 pt - Subheadings, emphasis
  • 18-24 pt - Headings (consider using Add Heading instead)

Common Fonts

  • Times New Roman - Traditional, formal documents
  • Arial - Clean, modern sans-serif
  • Calibri - Default Microsoft Office font
  • Courier New - Monospace, code samples
  • Georgia - Web-friendly serif font

Common Errors

  • "Invalid File Descriptor" - Ensure the Open Word node was executed first.
  • "Text cannot be empty" - Provide text content in the Text input.
  • "Font Size must be greater than zero" - Font size must be a positive number.
  • "Font Name cannot be empty" - Specify a valid font name.
  • "Space After must be equal to or greater than zero" - Use a non-negative value for spacing.

Notes

  • Text is always appended to the end of the document.
  • Each call to Add Text creates a new paragraph.
  • The text is formatted with regular (non-bold) style by default.
  • Line breaks within the Text input are preserved in the document.

See Also