# Add Comment (Cross-platform)

> `UiPath.Word.Activities.DocumentAddComment`

`UiPath.Word.Activities.DocumentAddComment`

## Description

Adds a comment to a Word document at the specified text or bookmark location. Add this activity inside a [Word Application Scope](https://docs.uipath.com/activities/other/latest/productivity/word-application-scope) activity.

## Project compatibility

Windows | Cross-platform

## Configuring the activity

* **File** - The resource file where the comment will be added. Select the plus icon, then **Use local file** to switch the current field to:
  * **File path** - The full path of the document file.
* **Comment** - The text content of the comment to insert into the document.
* **Search by** - The type of anchor for the comment. Select one of the following options:
  * **Text** - Searches for a text in the document and anchors the comment to the matched text.
  * **Bookmark** - Identifies a predefined bookmark in the Word document and anchors the comment to a named bookmark.
* **Text to search** - The text to search for in the document. The comment will be anchored to this text. Use the **Expression Editor** to configure this field.

## Properties

**Options**

* **Occurrence index** - The occurrence of the anchor text to target. For example, `1` targets the first occurrence, `2` targets the second. If omitted, defaults to the first match.
* **Author** - The author name for the comment. If not provided, it defaults to the current user.

:::note
For more details on the plus menu options, check [Designing automations](https://docs.uipath.com/studio/standalone/latest/user-guide/designing-automations).
:::
