# WordCellComment

A plain-text root comment anchored to a cell in the document body.

Class 

`OfficeIMO.Word`

**Namespace**

`OfficeIMO.Word`

**Assembly**

`OfficeIMO.Word`

**Source revision**

`5e5a2dda74b3` with working tree changes

**Source**

[WordCellComment.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.Word/WordCellComment.cs#L8)

**Modifiers**

sealed

A plain-text root comment anchored to a cell in the document body.

## Inheritance

- object
- WordCellComment

## Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Accepted by parameters 1

- Method [WordDocument.AddCellComments](/api/word/officeimo-word-worddocument/#method-addcellcomments-collections-generic-ienumerable-officeimo-word-wordcellcomment-threading-cancellationtoken) parameter `comments`

Filter members 

Show inherited

## Constructors

`public WordCellComment(WordTableCell cell, string author, string initials, string text, DateTime? dateTime = null)` [#](#constructor-ctor-officeimo-word-wordtablecell-string-string-string-nullable-system-datetime)

[WordCellComment.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.Word/WordCellComment.cs#L8)

Creates a cell comment. A null date leaves the creation timestamp unspecified.

Parameters

**cell OfficeIMO.Word.WordTableCell required**

**author string required**

**initials string required**

**text string required**

**dateTime System.DateTime? = null optional**

## Methods

`public static bool CanPreserveText(string text)` [#](#method-canpreservetext-string)

[WordCellComment.cs:30](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.Word/WordCellComment.cs#L30)

Determines whether Word's plain-text paragraph owner preserves the text without normalization.

Parameters

**text string required**

Returns

`bool`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public WordTableCell Cell { get; }` [#](#property-cell)

[WordCellComment.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.Word/WordCellComment.cs#L17)

Gets the destination cell. Its direct paragraphs form the comment range.

`public string Author { get; }` [#](#property-author)

[WordCellComment.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.Word/WordCellComment.cs#L19)

Gets the author's exact display name.

`public string Initials { get; }` [#](#property-initials)

[WordCellComment.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.Word/WordCellComment.cs#L21)

Gets the author's initials, which may be empty.

`public string Text { get; }` [#](#property-text)

[WordCellComment.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.Word/WordCellComment.cs#L23)

Gets plain text, including line feeds, tabs and whitespace.

`public DateTime? DateTime { get; }` [#](#property-datetime)

[WordCellComment.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.Word/WordCellComment.cs#L25)

Gets the creation timestamp, or null when unspecified.

<!-- PowerForge markdown artifact sha256:77938213454A3E672CD05D941B996463BC9D46792568BC50EB84A27146FCBC35 -->
