Text Doc
Styles
This group of instructions works with styles — named sets of formatting (such as “Heading 1” or “Normal”) that can be applied to paragraphs or to text. Instead of formatting each paragraph by hand, you apply a style, and every paragraph using that style shares the same look; change the style and they all update at once. These instructions let you apply an existing style, create a new custom style, modify or delete one, and copy styles from another document.
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 several instructions 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.
-
Style ID: every style has a short ID that identifies it (for example
Heading1,Normal, or a custom name you choose). Instructions that apply, modify, or delete a style refer to it by this ID. It is different from the Display name, which is the friendly name shown in the styles list. -
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 style name inheadingStyle, you can type@headingStylein the Style ID field. -
Search text — which paragraphs are affected (only for Apply Paragraph Style and Apply Character Style): these two instructions have a Search text field that decides which paragraphs they change:
- 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 that match distinguishes upper- and lower-case; it is off by default (so
Titlealso matchestitle). -
Sizes and colors: font size is given in points (pt); colors are given as hex codes (for example
FF0000for red), with or without a leading#. -
Saving a result: Copy Styles From Document offers a Save count in field that stores how many styles were copied under a name, so you can reuse it later. If left empty, nothing is saved.
-
“From variable” fields: the
@nametrick only works in text fields. So that the numeric Size field can also take its value from a saved value, it has a companion Size (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 Character Style .docx
- Apply Paragraph Style .docx
- Copy Styles From Document .docx
- Create Style .docx
- Delete Custom Style .docx
- Modify Style .docx
Apply Character Style .docx
Applies an existing character style to the text of the matching paragraphs.
When to use it: to give words a predefined text look (a character style) in a single step, instead of setting bold, color, and so on by hand.
| 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 |
| Style ID | ID of the character style to apply. Supports @name |
(empty) | Yes |
| 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 |
Important behavior: if Style ID is empty, the instruction does nothing.
The style has to exist in the document. A document this workflow creates carries no style definitions at all, so naming one that is not there writes the reference and leaves the text looking exactly as it was. Define it first with Create Style .docx, or bring the styles of another file with Copy Styles From Document .docx; a document opened from disk already carries its own. When the style is missing the run says so, naming the styles the document does have, and validate warns before running.
Apply Paragraph Style .docx
Applies an existing paragraph style to the matching paragraphs.
When to use it: to turn paragraphs into headings, quotes, or any predefined paragraph style in a single step.
| 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 |
| Style ID | ID of the paragraph style to apply (for example Heading1). Supports @name |
Normal |
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 |
Important behavior: if Style ID is empty, the instruction does nothing.
The style has to exist in the document. A document this workflow creates carries no
style definitions at all, so Heading1 on its title writes the reference and leaves the
text looking exactly as it was — no heading, no outline level, no navigation. Define it
first with Create Style .docx, or bring the styles of another file with Copy Styles
From Document .docx; a document opened from disk already carries its own. When the style
is missing the run says so, naming the styles the document does have, and validate
warns before running.
Copy Styles From Document .docx
Copies style definitions from another document into the current one.
When to use it: to reuse a set of styles you defined in a template or another file, without recreating them by hand.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Destination document the styles are copied into | (current document) | No |
| Source document path | Full path to the .docx to copy styles from. Supports @name |
(empty) | Yes |
| Only custom styles | Yes = copy only custom styles; No = copy all styles | Yes | No |
| Overwrite existing | Yes = replace styles that already exist with the same ID; No = keep the existing ones | No | No |
| Only custom styles (from variable) | Reads the yes/no value from a saved value | (empty) | No |
| Overwrite existing (from variable) | Reads the yes/no value from a saved value | (empty) | No |
| Save count in | Name under which to save how many styles were copied | (empty) | No |
Important behavior: if Source document path is empty, the instruction does nothing; if a path is given but the file does not exist, the instruction reports an error and the workflow stops. When Overwrite existing is No, any style whose ID already exists in the destination is skipped.
Create Style .docx
Creates a new custom style that you can then apply with Apply Paragraph Style or Apply Character Style.
When to use it: to define your own reusable paragraph or character style with a specific font, size, color, and alignment.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Style ID | Unique ID for the new style. Supports @name |
(empty) | Yes |
| Display name | Name shown for the style in the styles list. Supports @name |
(empty) | Yes |
| Type | paragraph or character. Supports @name |
paragraph |
No |
| Based on | ID of an existing style to inherit from; empty = no inheritance. Supports @name |
Normal |
No |
| Bold | Yes makes the style bold | No | No |
| Italic | Yes makes the style italic | No | No |
| Font | Font family name (for example Arial); empty = none. Supports @name |
(empty) | No |
| Size (pt) | Font size in points; 0 = none |
0 |
No |
| Color | Text color as a hex code; empty = none. Supports @name |
(empty) | No |
| Alignment | left, center, right, or justify (paragraph styles only) |
(empty) | No |
| Bold (from variable) | Reads the yes/no value from a saved value | (empty) | No |
| Italic (from variable) | Reads the yes/no value from a saved value | (empty) | No |
| Size (from variable) | Reads the size from a saved value | (empty) | No |
Important behavior: if Style ID or Display name is empty, the instruction does
nothing. If a style with the same ID already exists, it is not recreated.
Alignment applies only to paragraph styles. For a character style, a Based
on of Normal is ignored (Normal is a paragraph style).
Delete Custom Style .docx
Deletes a custom style. Paragraphs and text that used it revert to the default
(Normal).
When to use it: to remove a custom style you no longer need.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Style ID | ID of the custom style to delete. Supports @name |
(empty) | Yes |
Important behavior: only custom styles can be deleted; the built-in styles are protected and left untouched. If Style ID is empty, or the style does not exist or is not custom, nothing happens.
Modify Style .docx
Changes the formatting of an existing style. The change applies to every paragraph or piece of text that uses that style.
When to use it: to restyle everything using a style at once — for example, make all “Heading 1” paragraphs a different color.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Style ID | ID of the style to modify. Supports @name |
(empty) | Yes |
| Bold | No change leaves it as it is; Yes adds bold; No removes it |
No change (empty) |
No |
| Italic | No change leaves it as it is; Yes adds italic; No removes it |
No change (empty) |
No |
| Font | New font family; empty = leave unchanged. Supports @name |
(empty) | No |
| Size (pt) | New font size in points; 0 = leave unchanged |
0 |
No |
| Color | New text color as a hex code; empty = leave unchanged. Supports @name |
(empty) | No |
| Alignment | left, center, right, or justify; empty = leave unchanged (paragraph styles only) |
(empty) | No |
| Size (from variable) | Reads the size from a saved value | (empty) | No |
Important behavior: if Style ID is empty or the style does not exist, nothing happens. Empty fields are left unchanged, so you can change just the properties you specify. Alignment is applied only to paragraph styles.
This documentation is the help of the application, and it comes underCreative Commons Attribution 4.0.