Document Processing SDKs

Annotate DOCX Documents with C#

Add and manage annotations in Word DOCX files programmatically — no Microsoft Office required.

How to Annotate a DOCX in C#

GroupDocs.Annotation for .NET makes it easy to annotate DOCX documents:

  1. Open the DOCX with an Annotator instance.
  2. Create and configure the annotation you need.
  3. Add the annotation to the document.
  4. Save the annotated DOCX.
// Annotate a DOCX document

// Open the DOCX with an Annotator instance
using (Annotator annotator = new Annotator("input.docx"))
{
    // Create an area annotation
    AreaAnnotation area = new AreaAnnotation
    {
        Box = new Rectangle(100, 100, 200, 80),
        BackgroundColor = 65535,
        PageNumber = 0,
        Message = "Important"
    };

    // Add the annotation
    annotator.Add(area);

    // Save the annotated DOCX
    annotator.Save("annotated.docx");
}
dotnet add package GroupDocs.Annotation
click to copy
copied
More examples Documentation

Full Control Over DOCX Annotations

Add every annotation type to Word documents and manage them with a simple API.

Annotate DOCX documents

Text Markup

Highlight, underline, strike out, or replace text in DOCX files.

Shapes & Watermarks

Draw shapes and stamp watermarks or images onto DOCX pages.

Manage Annotations

Get, remove, import, and export DOCX annotations.

Read DOCX Annotations

Retrieve the annotations stored in an annotated DOCX document:

C#

//  Open the annotated DOCX
using (Annotator annotator = new Annotator("annotated.docx"))
{
    // Get all annotations
    List<AnnotationBase> annotations = annotator.Get();

    // Inspect each annotation
    foreach (AnnotationBase annotation in annotations)
    {
        System.Console.WriteLine(annotation.Message);
    }

    // Save the document
    annotator.Save("output.docx");
}
dotnet add package GroupDocs.Annotation
click to copy
copied
More examples Documentation

Annotate DOCX Files

GroupDocs.Annotation for .NET lets you add, edit, and remove annotations in Word DOCX documents. Highlight or strike out text, draw shapes, stamp watermarks and images, and attach threaded comments — then save the result back to DOCX.
Learn more
About illustration

Ready to get started?

Download GroupDocs.Annotation for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

Annotate Other File Formats

GroupDocs.Annotation for .NET supports annotating documents across many file formats:

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English