Word Read Text
Word Read Text
Section titled “Word Read Text”Type: word-read-text · Package: Word Activities v1.0.0 · Output: string
Reads all text from a Word document and returns it as a single string, with paragraphs separated by line breaks. It is the most direct way to read a document and then extract data with expressions.
How it works
Section titled “How it works”Returns the full text of the document. Accepts session (session mode) or path (quick mode) — see the two modes.
Required parameters
Section titled “Required parameters”Ninguno — pero debes indicar session o path.
Optional parameters
Section titled “Optional parameters”| Parameter | Editor | Description |
|---|---|---|
session | session | Word Open session (instead of path). |
path | expression | Route to .docx (fast mode: opens and closes alone). |
Output
Section titled “Output”Returns a string with all the text.
Example
Section titled “Example”Word Read Text path = = asset("contrato.docx") → output: textoSet Variable name = vigencia value = = regexFind(texto, "Vigencia:\s*(\d+ meses)")Related activities
Section titled “Related activities”- Word Read Paragraphs — the text separated by paragraphs.
- Word Read Tables — extract the tables.
- Word Find & Replace — modify the text.