Escribal
Back to Docs

Text Doc

Analysis

This group reads a .docx and saves what it finds for later instructions: its text, how many words or paragraphs it has, its headings, its bookmarks, one cell of a table, and the document properties. These instructions change nothing in the document.

Prerequisite: the workflow must already have a text document created or opened (with Create text document or Open text document). They are most useful right after Open text document, to pull data out of a file you already have.

  • Document: indicates which document in the workflow the instruction applies to. If left empty, the current document is used. If the document doesn’t exist, the instruction simply does nothing.
  • Saving a result: every instruction here has one or more “save … key” fields. If you leave them empty nothing is saved and the instruction has no effect — saving the result is what these instructions do.
  • Numbers: tables, rows and columns count from 1, the same as in the Tables group. A number that doesn’t exist is not an error: the instruction simply does nothing.
  • Fields “(from variable)” (xxxKey): for the number and yes/no fields, they are the equivalent of @name: if you fill one in, the value is read from the saved value with that name instead of the one typed in the panel. For example, Count Paragraphs can take its “include empty paragraphs” from a value another instruction saved earlier.

Count Paragraphs .docx

Counts the paragraphs of the document.

When to use it: to know how much content a document has, or to decide whether it is worth processing.

Parameter Meaning Default Required
Document Document the instruction applies to (current document) No
Include empty paragraphs Whether the blank paragraphs count No No
Include empty paragraphs (from variable) Reads that yes/no from a saved value (empty) No
Save count key Name to save the number of paragraphs under (empty) No

Important behavior: a .docx is full of empty paragraphs used as spacing, so by default they are not counted; a paragraph with only spaces counts as empty. Each paragraph of a table cell counts as a paragraph.


Count Words .docx

Counts the words of the document.

When to use it: to check a document is not empty before working on it, or to report its size.

Parameter Meaning Default Required
Document Document the instruction applies to (current document) No
Save count key Name to save the number of words under (empty) No

Important behavior: words are separated by spaces and line breaks, and the text inside tables counts too.


Get Document Properties .docx

Saves the document properties: title, author, subject, keywords and description.

When to use it: to reuse the data of a document you have opened — for example to put its title into the document you are building.

Parameter Meaning Default Required
Document Document the instruction applies to (current document) No
Save title key Name to save the title under (empty) No
Save author key Name to save the author under (empty) No
Save subject key Name to save the subject under (empty) No
Save keywords key Name to save the keywords under (empty) No
Save description key Name to save the description under (empty) No

Important behavior: these are the same five fields Set Document Properties writes. A property the file never had is saved as empty text, not as an error.


Get Plain Text .docx

Saves the whole text of the document, one line per paragraph.

When to use it: to carry what a document says into another one, or to look at it before deciding what to do next.

Parameter Meaning Default Required
Document Document the instruction applies to (current document) No
Save text key Name to save the text under (empty) No

Important behavior: the text inside tables is included, in the position the table occupies. Headers, footers, footnotes and comments are not part of it. Formatting is lost: what is saved is the text alone.


Get Table Cell .docx

Saves the text of one cell of a table.

When to use it: to read a value out of a table in a document you have opened, and use it in what follows.

Parameter Meaning Default Required
Document Document the instruction applies to (current document) No
Table number Table to read, counting from 1 1 No
Row number Row to read, counting from 1 1 No
Column number Column to read, counting from 1 1 No
Table number (from variable) Reads the table from a saved value (empty) No
Row number (from variable) Reads the row from a saved value (empty) No
Column number (from variable) Reads the column from a saved value (empty) No
Save text key Name to save the text of the cell under (empty) No

Important behavior: an index that doesn’t exist — a table, a row or a column past the end — saves nothing. If the cell has several paragraphs, they come out one after another with no separator. An empty cell is saved as empty text.


List Bookmarks .docx

Saves the list of bookmark names in the document.

When to use it: to find out which bookmarks a document already has before writing at one with Insert Text At Bookmark.

Parameter Meaning Default Required
Document Document the instruction applies to (current document) No
Save list key Name to save the list of names under (empty) No
Save count key Name to save how many there are under (empty) No

Important behavior: Word processors keep bookmarks of their own (such as _GoBack) in almost every document; the ones whose name starts with an underscore are left out, because they are not something you put there.


List Headings .docx

Saves the list of headings of the document, in the order they appear.

When to use it: to build an index elsewhere, or to loop over the sections of a document with For Each.

Parameter Meaning Default Required
Document Document the instruction applies to (current document) No
Maximum heading level Deepest level to include (1 to 9) 9 No
Maximum heading level (from variable) Reads the level from a saved value (empty) No
Save list key Name to save the list of headings under (empty) No
Save count key Name to save how many there are under (empty) No

Important behavior: a paragraph counts as a heading when it uses one of the built-in heading styles (Heading 1 to Heading 9); a big bold paragraph that only looks like a heading is not one. The saved list is a list of texts, so a For Each can walk it. A level outside 1–9 is brought back inside the range.


This documentation is the help of the application, and it comes underCreative Commons Attribution 4.0.