Open or Create Word Document
Command description
- Open an existing file or create it if it does not exist. Existing content is not cleared.
- Visibility controls whether Microsoft Office or WPS is shown while the workflow runs.
- After reading or writing, use Close Word Document to release resources. Reopen the document with Open or Create Word Document before using it again.
Command Input Parameters
| input parameters | Input parameter type | Description |
|---|---|---|
| Application | enum | Auto, WPS, Office; use the WPS or Microsoft Office COM interface |
| Visibility | enum | Hide, Show; whether to display the application during automation |
| File Location | str | File path, such as C:\xx.docx; a relative path is resolved under the current user's Documents/RPA directory |
Command Output Parameters
| Output parameters | Output parameter type | Description |
|---|---|---|
| Word Object | WordApp | The opened document object; use its path attribute to get the full file path |
tip
This command automates Microsoft Word or Kingsoft WPS on the current computer, so one of those applications must be installed.