Text Doc
Paragraph formatting
This group of instructions changes how whole paragraphs look and behave: alignment, indentation, line and paragraph spacing, tab stops, borders, background color, page-break behavior, and reading direction. Each instruction finds the paragraphs you want and applies the formatting to them.
Prerequisite: before using any of these instructions, the workflow must already have a DOCX document created or opened (with Create text doc), which these instructions will act upon.
These concepts recur across every instruction in this group; they are explained here once.
-
Document: indicates which document in the workflow the instruction applies to. If left empty, the current document is used.
-
Dynamic values (
@name): in any text field you can type@followed by the name of a value saved earlier in the workflow, and it will be replaced by that value. For example, if you saved a color inbrandColor, you can type@brandColorin the Color field. -
Search text — which paragraphs are affected: every instruction has a Search text field that decides which paragraphs it changes:
- If you leave it empty, the instruction is applied to every paragraph in the document.
- If you type some text, only paragraphs whose text contains that text are affected.
-
Case sensitive: decides whether the Search text match distinguishes between upper- and lower-case. It is off by default (so
Titlealso matchestitle). -
Saving a result: each instruction offers a Save count in field that stores how many paragraphs were modified under a name, so you can reuse it later. If left empty, nothing is saved.
-
Measurement units: indents and tab positions are given in centimetres (cm); line/paragraph spacing and border thickness are given in points (pt).
-
“From variable” fields: the
@nametrick only works in text fields. So that a numeric field (like Thickness) or a yes/no field (like Case sensitive) can also take its value from a saved value, each one has a companion “from variable” field:- If you leave it empty, the value typed in the normal field is used.
- If you fill it in with the name of a saved value, the engine ignores the normal field and uses that variable’s value.
This is mainly for chaining instructions (one instruction saves a value, the next one reads it). If you only work with fixed values, you can ignore these fields.
- Apply Paragraph Background Color .docx
- Apply Paragraph Border .docx
- Set Alignment .docx
- Set Indentation .docx
- Set Line Spacing .docx
- Set Page Control .docx
- Set Paragraph Spacing .docx
- Set Tab Stop .docx
- Set Text Direction .docx
Apply Paragraph Background Color .docx
Applies a background shading color to the matching paragraphs, like a highlighter that covers the whole paragraph.
When to use it: to visually emphasize a paragraph with a solid fill color.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Search text | Only paragraphs containing this text are affected; empty = all. Supports @name |
(empty) | No |
| Color | Background color as a hex code (for example FFFF00 for yellow). Supports @name |
FFFFFF (white) |
No |
| Case sensitive | Whether the search-text match is case-sensitive | No | No |
| Case sensitive (from variable) | Reads the yes/no value from a saved value | (empty) | No |
| Save count in | Name under which to save how many paragraphs were modified | (empty) | No |
Important behavior: the color may be written with or without a leading #.
Apply Paragraph Border .docx
Adds or changes a border around the matching paragraphs.
When to use it: to frame a paragraph, or to add a single rule above or below it.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Search text | Only paragraphs containing this text are affected; empty = all. Supports @name |
(empty) | No |
| Side | Which side to border: top, bottom, left, right, or box (all four) |
box |
No |
| Style | Line style: none, single, double, dotted, thick, shadow. Supports @name |
single |
No |
| Thickness (pt) | Border thickness in points | 1 |
No |
| Color | Border color as a hex code (for example 000000). Supports @name |
000000 (black) |
No |
| Case sensitive | Whether the search-text match is case-sensitive | No | No |
| Thickness (pt) (from variable) | Reads the thickness from a saved value | (empty) | No |
| Case sensitive (from variable) | Reads the yes/no value from a saved value | (empty) | No |
| Save count in | Name under which to save how many paragraphs were modified | (empty) | No |
Important behavior: Side box applies the same border to all four sides at
once. The color may be written with or without a leading #.
Set Alignment .docx
Sets the horizontal alignment of the matching paragraphs.
When to use it: to left-align, center, right-align, or justify paragraphs.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Search text | Only paragraphs containing this text are affected; empty = all. Supports @name |
(empty) | No |
| Alignment | left, center, right, or justify |
left |
No |
| Case sensitive | Whether the search-text match is case-sensitive | No | No |
| Case sensitive (from variable) | Reads the yes/no value from a saved value | (empty) | No |
| Save count in | Name under which to save how many paragraphs were modified | (empty) | No |
Important behavior: an unrecognized Alignment value falls back to left.
Set Indentation .docx
Sets the left, right, first-line, or hanging indent of the matching paragraphs, measured in centimetres.
When to use it: to indent paragraphs from the margins, indent only the first line, or create a hanging indent.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Search text | Only paragraphs containing this text are affected; empty = all. Supports @name |
(empty) | No |
| Left indent (cm) | Indent from the left margin. -1 leaves it unchanged; 0 removes it |
-1 (unchanged) |
No |
| Right indent (cm) | Indent from the right margin. -1 leaves it unchanged; 0 removes it |
-1 (unchanged) |
No |
| First line indent (cm) | Extra indent of just the first line. -1 leaves it unchanged; 0 removes it |
-1 (unchanged) |
No |
| Hanging indent (cm) | Hanging indent (every line except the first). -1 leaves it unchanged; 0 removes it |
-1 (unchanged) |
No |
| Case sensitive | Whether the search-text match is case-sensitive | No | No |
| Left indent (from variable) | Reads the left indent from a saved value | (empty) | No |
| Right indent (from variable) | Reads the right indent from a saved value | (empty) | No |
| First line indent (from variable) | Reads the first-line indent from a saved value | (empty) | No |
| Hanging indent (from variable) | Reads the hanging indent from a saved value | (empty) | No |
| Case sensitive (from variable) | Reads the yes/no value from a saved value | (empty) | No |
| Save count in | Name under which to save how many paragraphs were modified | (empty) | No |
Important behavior: every measurement uses the same rule — -1 leaves that
value unchanged, 0 removes it, a positive number sets it. If Hanging indent is
0 or more it takes precedence over First line indent. A paragraph where nothing
would change is skipped.
Set Line Spacing .docx
Sets the spacing between the lines inside the matching paragraphs.
When to use it: for single, 1.5, or double line spacing, or for an exact or multiplied spacing.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Search text | Only paragraphs containing this text are affected; empty = all. Supports @name |
(empty) | No |
| Type | single, 1.5, double, exact, or multiple. Supports @name |
single |
No |
| Value | Used only with exact (in points) or multiple (a multiplier); ignored otherwise |
1 |
No |
| Case sensitive | Whether the search-text match is case-sensitive | No | No |
| Value (from variable) | Reads the value from a saved value | (empty) | No |
| Case sensitive (from variable) | Reads the yes/no value from a saved value | (empty) | No |
| Save count in | Name under which to save how many paragraphs were modified | (empty) | No |
Important behavior: an unrecognized Type leaves the paragraph unchanged.
With exact, Value is a measurement in points; with multiple, Value is a
multiplier (for example 1.15).
Set Page Control .docx
Controls how the matching paragraphs behave around page breaks.
When to use it: to keep a heading with the paragraph that follows it, to force a paragraph to start on a new page, or to prevent a lone line from being stranded at the top or bottom of a page.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Search text | Only paragraphs containing this text are affected; empty = all. Supports @name |
(empty) | No |
| Control widows/orphans | Prevents a single line of the paragraph from being left alone at the top or bottom of a page | Yes | No |
| Keep with next | Keeps the paragraph on the same page as the paragraph that follows it | No | No |
| Page break before | Forces the paragraph to start on a new page | No | No |
| Case sensitive | Whether the search-text match is case-sensitive | No | No |
| Control widows/orphans (from variable) | Reads the yes/no value from a saved value | (empty) | No |
| Keep with next (from variable) | Reads the yes/no value from a saved value | (empty) | No |
| Page break before (from variable) | Reads the yes/no value from a saved value | (empty) | No |
| Case sensitive (from variable) | Reads the yes/no value from a saved value | (empty) | No |
| Save count in | Name under which to save how many paragraphs were modified | (empty) | No |
Set Paragraph Spacing .docx
Sets the spacing above and below the matching paragraphs, measured in points.
When to use it: to add breathing room before or after paragraphs instead of inserting empty lines.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Search text | Only paragraphs containing this text are affected; empty = all. Supports @name |
(empty) | No |
| Space before (pt) | Space above the paragraph. -1 leaves it unchanged; 0 removes it |
-1 (unchanged) |
No |
| Space after (pt) | Space below the paragraph. -1 leaves it unchanged; 0 removes it |
-1 (unchanged) |
No |
| Case sensitive | Whether the search-text match is case-sensitive | No | No |
| Space before (from variable) | Reads the space-before value from a saved value | (empty) | No |
| Space after (from variable) | Reads the space-after value from a saved value | (empty) | No |
| Case sensitive (from variable) | Reads the yes/no value from a saved value | (empty) | No |
| Save count in | Name under which to save how many paragraphs were modified | (empty) | No |
Important behavior: if both Space before and Space after are -1, the
paragraph is skipped.
Set Tab Stop .docx
Adds a tab stop at a given position to the matching paragraphs.
When to use it: to line text up at a precise position when you press Tab, optionally with a leader (a row of dots or dashes leading up to it).
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Search text | Only paragraphs containing this text are affected; empty = all. Supports @name |
(empty) | No |
| Position (cm) | Position of the tab stop from the left margin | 2.54 |
No |
| Alignment | left, center, right, or decimal |
left |
No |
| Leader | Fill character before the tab: none, dots, dashes, underline |
none |
No |
| Case sensitive | Whether the search-text match is case-sensitive | No | No |
| Position (from variable) | Reads the position from a saved value | (empty) | No |
| Case sensitive (from variable) | Reads the yes/no value from a saved value | (empty) | No |
| Save count in | Name under which to save how many paragraphs were modified | (empty) | No |
Important behavior: if a tab stop already exists at the same position, it is replaced.
Set Text Direction .docx
Sets the reading direction of the matching paragraphs, left-to-right or right-to-left.
When to use it: for right-to-left languages such as Arabic or Hebrew.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Search text | Only paragraphs containing this text are affected; empty = all. Supports @name |
(empty) | No |
| Direction | ltr (left-to-right) or rtl (right-to-left). Supports @name |
ltr |
No |
| Case sensitive | Whether the search-text match is case-sensitive | No | No |
| Case sensitive (from variable) | Reads the yes/no value from a saved value | (empty) | No |
| Save count in | Name under which to save how many paragraphs were modified | (empty) | No |
Important behavior: rtl turns on right-to-left; any other value (including
ltr) removes the right-to-left setting.
This documentation is the help of the application, and it comes underCreative Commons Attribution 4.0.