What You Can Do with GroupDocs.Redaction for .NET

Delete Metadata in WORD Files Using .NET

Protect personal and corporate data in WORD files with C#. Simple tools for reliable file privacy.

Delete Metadata from Word Files

With GroupDocs.Redaction, it’s easy to clean document metadata in your .NET environment.

  1. Initialize a Redactor object and open your Word document.
  2. Set up rules to wipe all hidden metadata.
  3. Run the redaction to remove sensitive tags.
  4. Save your cleaned document.
// Wipe metadata from WORD files

// Open the document using Redactor
using (Redactor redactor  = new Redactor("input.docx"))
{
    // Set metadata removal options
    var redaction = new EraseMetadataRedaction(MetadataFilters.All);
    
    // Redact and save the cleaned file
    redactor.Apply(redaction);
    redactor.Save();
}
dotnet add package GroupDocs.Redaction
click to copy
copied
More examples Documentation

Redact Confidential Data from Documents

With GroupDocs.Redaction for .NET, you can remove private content from various formats. Keep your files secure while maintaining their structure.

Metadata and Content Redaction Tools

Replace Sensitive Text

Find text in documents and safely remove or change it to protect private information.

Mask Images

Cover sensitive areas of images with overlays to hide visual data.

Erase Metadata

Find and clean hidden data to avoid leaking information.

Edit or Delete Hidden Metadata

This example shows how to target and clean metadata entries in a WORD document.

C#

//  Load the file for redaction
using (Redactor redactor  = new Redactor("source.docx"))
{
    // Remove the Author metadata
    MetadataSearchRedaction redactionAuthor = 
        new MetadataSearchRedaction(@"[A-Za-z0-9 ]+", "GroupDocs Company")
    {
        Filter = MetadataFilters.Author
    };

    // Remove the Title metadata
    MetadataSearchRedaction redactionTitle = 
        new MetadataSearchRedaction(@"[A-Za-z0-9 ]+", "GroupDocs.Redaction Usage")
    {
        Filter = MetadataFilters.Title
    };

    // Run redaction process
    var redactions = new MetadataSearchRedaction[] { redactionAuthor, redactionTitle };
    redactor.Apply(redactions);

    // Export the clean document
    var saveOptions = new SaveOptions() { AddSuffix = true, RasterizeToPDF = false };
    var outputPath = redactor.Save(saveOptions);
}
dotnet add package GroupDocs.Redaction
click to copy
copied
More examples Documentation

About GroupDocs.Redaction for .NET

GroupDocs.Redaction helps C# developers protect content in WORD files. Clean text, images, and metadata quickly and easily.
Learn more
About illustration

Ready to get started?

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

Useful resources

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

Metadata Redaction in WORD with .NET

Use .NET to clean hidden metadata from WORD files. Simple tools to keep sensitive info safe.

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