For the complete documentation index, see llms.txt. This page is also available as Markdown.

Built-In Functions

Entry point for Word document operations — returns a fluent WordDocument builder

The word() BIF is the primary entry point for all Word document operations. It returns a WordDocument instance that supports fluent method chaining.

Method Signature

word( [file], [text], [html], [markdown] )

Arguments

Argument
Type
Required
Default
Description

file

String

No

—

Path to an existing .docx file to open and modify

text

String

No

—

Plain text content to populate the document with

html

String

No

—

HTML string to parse and populate the document with

markdown

String

No

—

Markdown string to parse and populate the document with

When no arguments are provided, a new empty document is created. When multiple content arguments are provided (e.g., text and html), the content is appended in argument order.

Returns

A WordDocument instance — a fluent builder that supports method chaining.


Examples

Create a New Empty Document

Open an Existing Document

Create from Plain Text

Create from Markdown

Create from HTML

Combined Arguments

Full Fluent Chain


Fluent APIhttps://github.com/ortus-boxlang/boxlang-docs/tree/v1.x/boxlang-framework/boxlang-plus/user-guide.md

Last updated

Was this helpful?