Word File Operations
Word Document Handler Function helps verify specific attributes or formatting in Word documents, such as checking if a text is present as a watermark or if a particular text has strikethrough formatting. This function streamlines quality assurance by automating document reviews and returning results in variables for easy use in workflows. This saves time, improves accuracy, and ensures consistent document processing.
In the following sections, we will define the commands available under this function, along with their configuration details:
Verify Watermark Command: verifyWaterMark
The verifyWaterMark command checks if a specific text is detected as a watermark in a Word document. This command is useful for verifying the presence of watermarks in files during document processing or quality assurance tasks.
Note: Ensure that the file path provided is accurate and the Word document is not open during execution to avoid errors.
Example: You want to verify if the text “Confidential” is present as a watermark in the Word document C:\Documents\Report.docx.
Steps to Configure:
- Select Set a Variable Value from the Action dropdown.
- In the Element Key field, enter a variable name (e.g., WatermarkCheckResult). This variable will store the result of the verification (true or false).
- Click on Form to open the configuration form.
- From the dropdown, select Functions and choose Word Document Handler Functions.
- In the Cmd field, select verifyWaterMark.
- Provide the following parameters:
- File Path: Specify the path to the Word document you want to check (e.g., C:\Documents\Report.docx).
- Text: Enter the text you want to verify as the watermark (e.g., Confidential).
- Click Save.


Outcome on Execution:
- If the specified text is detected as a watermark, the command returns true in the variable defined in the Element Key (e.g., WatermarkCheckResult).
- If the text is not detected as a watermark, it returns false.
- This variable can be referenced in later steps of your automation process using the syntax ${VariableName} (e.g., ${WatermarkCheckResult}).
Verify StrikeThrough Command: verifyStrikeThrough
The verifyStrikeThrough command checks if a specific text in a Word document has a strikethrough applied. This command is helpful for verifying text formatting during document reviews or quality assurance processes.
Note: Ensure that the file path provided is accurate and the Word document is not open during execution to avoid errors.
Example: You want to verify if the text “Outdated Info” in the Word document C:\Documents\Updates.docx is formatted with a strikethrough.
Steps to Configure:
- Select Set a Variable Value from the Action dropdown.
- In the Element Key field, enter a variable name (e.g., StrikeThroughCheckResult). This variable will store the result of the verification (true or false).
- Click on Form to open the configuration form.
- From the dropdown, select Functions and choose Word Document Handler Functions.
- In the Cmd field, select verifyStrikeThrough.
- Provide the following parameters:
- File Path: Specify the path to the Word document you want to check (e.g., C:\Documents\Updates.docx).
- Text: Enter the text you want to verify for the strikethrough format (e.g., Outdated Info).
- Click Save.


Outcome on Execution:
- If the specified text is detected with a strikethrough, the command returns true in the variable defined in the Element Key (e.g., StrikeThroughCheckResult).
- If the text is not formatted with a strikethrough, it returns false.
- This variable can be referenced in later steps of your automation process using the syntax ${VariableName} (e.g., ${StrikeThroughCheckResult}).