Read text
Return the paragraph text, one paragraph per line, of the whole body, a range of paragraphs, the text inside a bookmark or one page, optionally with tables, headers and footers.
Command in the Word toolkit · id ooa.word/read_text · 8 inputs, 2 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Session | String | No | word | Session name. |
| Include tables | Boolean | No | false | Also return the text of table cells, in document order, one cell per line. |
| Include headers footers | Boolean | No | false | Also return the text of page headers (before the body) and footers (after it). |
| From paragraph | Number | No | 1-based first body paragraph to read; the first when empty. | |
| To paragraph | Number | No | 1-based last body paragraph to read; the last when empty. | |
| Bookmark | String | No | Read only the text between the start and end of this bookmark (tables inside it included); overrides the paragraph range and page. | |
| Page | Number | No | Read only this 1-based page (see page_breaks for how pages are counted); overrides the paragraph range. | |
| Page breaks | String | No | auto | How pages are counted: auto uses the page layout Word saved in the file when there is one, else the page and section breaks stored in it; layout uses only Word's saved layout; breaks uses only the stored breaks (pages Word fills up on its own are then not counted). |
Outputs
| Output | Type | What it is |
|---|---|---|
| text | String | Document text. |
| paragraphs | List | Each body paragraph's text. |