Open Word
Opens an existing Word document file for editing and manipulation. This node creates a file descriptor that is used by other Word nodes to perform operations on the document.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing the node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If ContinueOnError property is true, no error is caught when the project is executed even if Catch node is used.
Input
- Path - Full path to the Word document file to open (e.g.,
C:\Documents\Report.docx). The file must exist at the specified location.
Output
- Out File Descriptor - File descriptor ID to use in subsequent Word operations. Default variable name is
word_fd. This identifier is required by all other Word nodes to reference this specific document.
Options
- Visible - Whether to show the Word application window during processing. Default is
false(hidden mode).true- Word window is visible (useful for debugging)false- Word runs in background (recommended for production)
Use Cases
- Opening existing Word documents for automated updates
- Reading data from Word files for processing
- Batch processing multiple Word documents
- Template-based document generation
- Extracting content from Word files
Example Workflow
To open and edit a Word document:
- Add the Open Word node to your flow
- Set the Path input to
C:\Templates\Invoice.docx - The node outputs a file descriptor (e.g., stored in
word_fdvariable) - Use subsequent nodes like Add Text, Replace Text, etc., with this file descriptor
- Finally, use Close Word to save and close the document
// Example: Opening a Word document
// Path input: "C:\\Reports\\QuarterlyReport.docx"
// Output: word_fd = "abc-123-def-456"
tip
Keep the Visible option set to false for better performance. Only set it to true when debugging your automation.
Common Errors
- "Path cannot be empty" - The Path input must be provided with a valid file path.
- "Invalid File Descriptor" - The file does not exist at the specified path. Verify the path is correct.
- File is already open - Close the file in Word before running the automation, or use a different file descriptor.
- Access denied - Ensure the robot has read/write permissions to the file.
Notes
- The file descriptor is automatically cleaned up when the flow ends or when Close Word is called.
- Multiple documents can be opened simultaneously by using different file descriptors.
- Always pair Open Word with Close Word to properly release resources.
See Also
- Create Word - Create a new Word document
- Close Word - Close an open Word document
- Read Word - Read content from the document