Skip to content

Latest commit

 

History

History
45 lines (27 loc) · 1.21 KB

Word.Document.Comments.md

File metadata and controls

45 lines (27 loc) · 1.21 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Document.Comments property (Word)
vbawd10.chm158007305
vbawd10.chm158007305
Word.Document.Comments
1597a002-afa4-743d-60a6-ffd398f2b599
06/08/2017
medium

Document.Comments property (Word)

Returns a Comments collection that represents all the comments in the specified document. Read-only.

Syntax

expression.Comments

expression A variable that represents a Document object.

Remarks

For information about returning a single member of a collection, see Returning an object from a collection.

Example

This example compares the author name of each comment in the active document with the user name on the User Information tab in the Options dialog box (Tools menu). If the names aren't the same, the comment reference mark is formatted to appear in red.

For Each comm In ActiveDocument.Comments 
 If comm.Author <> Application.UserName Then _ 
 comm.Reference.Font.ColorIndex = wdRed 
Next comm

[!includeSupport and feedback]