Skip to main content

Create document

Create a new .docx (or .doc, .rtf or .odt) file on disk, empty or as a copy of a template document, optionally password-protected, and open it as a named session.

Command in the Word toolkit · id ooa.word/create_document · 7 inputs (1 required), no outputs

Inputs​

InputTypeRequiredDefaultWhat it is
PathFileYesPath of the new document.
OverwriteBooleanNofalseReplace a file that already exists at the path.
SessionStringNowordSession name.
PasswordCredentialNoEncrypt the new file with this password; later saves keep it.
TemplateFileNoExisting .docx whose content and styles the new document starts from; empty document when empty.
Edit passwordCredentialNoRestrict editing with this password: Word opens the document read-only until the password is given (Review > Restrict Editing > Stop Protection).
ShareBooleanNofalseAgents this one runs may use it.