---
description: Writes the specified text into a Word file.
---

# Write Text

Write the text at a position relative to a specified bookmark, newline, or at the end of a specified Word document.

{% hint style="info" %}
This activity can only be used after the [Open Word Document](open-word-document) activity.
{% endhint %}

### Input

* **Input** : [`WordHandle Variable`](../../../../getting-started/rpa-studio/variables#wordhandle)<mark style="color:red;">`Required`</mark>\
  The word handle object to reference the opened word document.
* **Text Content** : `String Argument` <mark style="color:red;">`Required`</mark>\
  The text content that is to be written to a word document.

### Options

* **Bookmark** : [`String Argument`](../../../../getting-started/rpa-studio/arguments#types-of-arguments)`Optional`\
  The bookmark in which the text content is to be inserted.
* **New Line** : [`Integer Argument`](../../../../getting-started/rpa-studio/arguments#types-of-arguments)`Optional`\
  The number of lines written before writing the text content.

{% hint style="info" %}
If the input word document contains a table, then the line number depends on the number of cells in the table.
{% endhint %}

* **Position** : `Optional`
  * `Before` - The Text will be inserted before the bookmark. (`default`)
  * `After` - The Text will be inserted after the bookmark.
* **Text Style** :
  * `Normal` - The text is formatted as the default style. (`default`)
  * `Bold` - The text is formatted as bold.
  * `Italic` - The text is formatted as italic.
