docs_update_document

Edit a document (.docx) in Files from Markdown (same Markdown as docs_create_document). mode='replace' rewrites the whole body (the page setup, styles, header and footer stay; formatting Markdown can't express is reset — read it first with docs_read_document). Keep the ![alt](image:N) placeholders from docs_read_document where pictures should stay (move one to move the picture, change the alt text in the brackets, leave it out to remove the picture); new pictures can't be added from Markdown. mode='append' adds the Markdown at the end and leaves everything already there untouched. Saves a NEW version (restorable from Versions in the editor). Pass expected_version (from docs_read_document) so the edit is refused if someone changed the file since you read it.

Parameters

More IT tools · API quickstart