Edit a Word document
edit_documentEdit DOCX, PDF, ODT, RTF, Markdown, HTML or TXT files without changing originals; replace text, add comments or tracked changes, append content, and save a new edited copy.
Instructions
Edit existing documents (docx, doc, odt, rtf, md, html, txt...) without touching the originals: find and replace (with match case / whole word / wildcards), comments on found text, tracked changes (so every edit is reviewable in Word), accept or reject existing revisions, append content blocks (same blocks as create_document), change properties, page setup and headers / footers, and remove personal information. Saves "_edited." (or the formats asked for) next to each input or in output_dir.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scale | No | png only: pixels per point (default 2 ≈ 144 dpi). | |
| title | No | Document title (properties). | |
| append | No | Blocks added at the end of the document. | |
| author | No | Document author; also who tracked changes and comments are by. | |
| footer | No | Footer text on every page. | |
| header | No | Header text on every page. | |
| markup | No | Print Markup: tracked changes marked up and comments beside each page (pdf / png), a comment list (html / md / txt). | |
| suffix | No | _edited | |
| formats | No | Default: the input format (docx for doc). | |
| margins | No | ||
| preview | No | ||
| replace | No | ||
| subject | No | ||
| comments | No | ||
| keywords | No | ||
| password | No | docx only: encrypt the saved document with this password. | |
| input_dir | No | Every document directly in this folder. | |
| overwrite | No | Replace existing outputs. | |
| page_size | No | Letter (default), Legal, A4, A5, Executive... | |
| revisions | No | What to do with revisions already in the document (done first). | keep |
| input_path | No | ||
| output_dir | No | Absolute output folder (default: next to the input; required for new documents). | |
| input_paths | No | ||
| orientation | No | ||
| output_path | No | Absolute output file for the first format (its extension must match). | |
| export_pages | No | png only: pages to render, 1-based: "1-3,5" (default all). | |
| page_numbers | No | Page numbers in the footer (bottom) or header (top). | |
| track_changes | No | Record the replacements and additions as tracked changes. | |
| remove_personal_info | No | Remove comments, revisions and document properties (Document Inspector). |