Use the Insert text action to insert a text at a specific position within the Word document.

Considerations

An error is displayed if one of the following conditions are encountered when you deploy your automation to insert text in a Word document:
  • The session name that you have specified is invalid.
  • The bookmark name that you have specified is invalid or does not exist.
  • If the specified Word document is read-only or is not opened in the read-write mode.

Settings

  • Use the Session name field to specify the name of the Word session where you want to insert text from one of the following options:
    • Session name: Enter the name that you gave the session when you opened it.
    • Variable: Select the variable that you have created to store the session name.
  • Use the Insert position field to select one of the following options for specifying where you want to insert the text:
    • Start: Insert the text at the beginning of the Word document.

      This is the default setting and the text will be inserted at the beginning of the content in the specified Word document.

    • Last: Insert the text at the end of the Word document.
    • Bookmark: Insert text into an available bookmark.
  • Use Text to insert field to specify the type of text you want to insert.
    • Plain text: To enter a simple text as a string variable.
    • HTML: To insert HTML, use the following options:
      • Use the Text field to enter the HTML.

        You can also click the Insert a value icon to select an existing variable or global value that holds the HTML.

      • (Optional) In the Font name field, enter the name of the font (for example, Arial, Courier New, Herald, and so on) that you want to apply to the selected text.

        If you have stored the font name as a variable or global value, click the Insert a value icon to select it.

      • (Optional) In the Font color field, enter the decimal value for the font color code.

        For example, if you want to change the color of the font, in the Font color field enter 255 for Pure Red, 16711680 for Pure Blue, 65280 for Pure Green, and so on.

      • (Optional) In the Font size field, enter the size that you want to apply to the selected text.

        In Microsoft Word, 1 pt is the minimum and 1638 pt is the maximum font sizes you can set.

      • (Optional) Select the following check boxes to apply a style to the selected text based on your requirement:
        • Font bold
        • Font italic
        • Font underline
      Note: If you provide or set an invalid font type (name, color, size or type), the default font type that is set in the Microsoft Word application is retained.