Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

How to: Add Comments to Text in Documents


Some code examples in this topic use the this or Me keyword or the Globals class in a way that is specific to document-level customizations, or they rely on features of document-level customizations such as host controls. These examples can be compiled only if you have the required applications installed. For more information, see Features Available by Product Combination.

Use the Comments property of the Microsoft.Office.Tools.Word.Document to add a comment to a range of text within a Microsoft Office Word 2003 document.

The following example adds a comment to the first paragraph in the document.

To add a new comment to text

  • Call the Add method of the Comments property and supply a range and the comment text.

    object text = "Add a comment to the first paragraph.";
    this.Comments.Add(this.Paragraphs[1].Range, ref text);

See Also

Community Additions

© 2015 Microsoft