How to Configure Custom Document Inspection, Metadata Scrubbing, and Privacy Flags in Microsoft Word

When legal briefs, mergers and acquisitions documentation, or confidential architectural proposals are distributed outside an organisation, releasing hidden document metadata poses severe legal and operational risks. Microsoft Word files (in the Open XML .docx format) store extensive forensic history beyond visible text: author profiles, total editing time, embedded revision tags, internal file server paths, custom XML nodes, and hidden text.

The Microsoft Word Document Inspector provides an integrated diagnostic engine designed to detect and eradicate sensitive metadata streams. For enterprise administrators, configuring automated metadata scrubbing—via the native Trust Center, Windows Registry, or enterprise Group Policy (GPO)—ensures data loss prevention (DLP) compliance without relying solely on manual end-user vigilance.

Architectural Overview: Metadata Storage in Open XML (.docx) Archives

A modern Microsoft Word document is not a monolithic binary file; it is an Open Packaging Conventions (OPC) compliant ZIP archive containing distinct XML streams:

Archive Part XML File Path Sensitive Metadata Held
Core Properties docProps/core.xml Author names, document title, initial creation timestamp, last modified by, revision counter.
Extended Properties docProps/app.xml Application version, total editing time (in minutes), paragraph counts, template paths.
Custom Properties docProps/custom.xml Internal classification tags, CRM client identifiers, enterprise sensitivity schemas.
Document Body word/document.xml Tracked revisions (w:ins, w:del), author initials, deleted passages, hidden text runs (w:vanish).
Annotations word/comments.xml Draft commentary, internal deliberations, reviewer email addresses.

If a user converts a document to PDF or transmits the raw .docx without sanitisation, external parties can unzip the archive and extract historical drafts or identify internal collaborators who worked on the material.

Running Document Inspector Manually in Word Desktop

Before transmitting a critical file externally, users can execute the Document Inspector to sanitize active XML payloads.

Step 1: Save a Pre-Inspection Backup

Because removing metadata, tracked changes, and hidden XML properties is irreversible, always retain an internal working master copy before scrubbing.

Step 2: Launch the Inspector

  1. Open the document in Microsoft Word and click File > Info.
  2. Click the Check for Issues button adjacent to Inspect Document.
  3. Select Inspect Document from the dropdown menu.
  4. When prompted to save changes, click Yes.

Step 3: Select Inspection Modules

The Document Inspector modal presents specific diagnostic modules. Ensure the following critical checkboxes are selected:

  • Comments, Revisions, and Versions: Detects unaccepted Track Changes, margin comments, and ink annotations.
  • Document Properties and Personal Information: Audits core.xml for author names, managers, and template locations.
  • Task Panes and Add-ins: Scans for third-party web add-ins embedded in the document.
  • Custom XML Data: Locates internal database schemas mapped to document content controls.
  • Headers, Footers, and Watermarks: Finds residual draft markings on unlinked section pages.
  • Hidden Text: Flags text runs tagged with the Hidden font attribute.

Step 4: Execute Inspection and Scrub Findings

  1. Click Inspect. The engine evaluates each archive stream and flags detected items with an exclamation mark.
  2. Click Remove All adjacent to each flagged category.
  3. Click Re-inspect to verify that all targeted metadata streams report clean statuses.
  4. Save the sanitized document.

Configuring Automatic Metadata Scrubbing on File Save

To prevent human error, Microsoft Word can be instructed to scrub personal author tags automatically every time a user saves the document.

Enabling Privacy Flags via Trust Center

  1. In Word, navigate to File > Options.
  2. Select Trust Center in the left navigation pane and click Trust Center Settings.
  3. Select Privacy Options.
  4. Under Document-specific settings, check the box: Remove personal information from file properties on save. (Note: This setting activates automatically after running Document Inspector and removing personal info once).
  5. Click OK.

With this setting active, whenever the file is saved, Word strips author names, modification usernames, and timestamps, replacing them with generic tags (e.g. Author).

Enforcing Metadata Privacy via Enterprise Group Policy (GPO)

In legal firms and financial institutions, relying on individual employees to configure Trust Center settings is inadequate. Administrators can enforce metadata scrubbing across all managed Windows endpoints using Group Policy.

Administrative Template Paths

Using the Microsoft 365 / Office ADMX templates, navigate to:

User Configuration > Administrative Templates > Microsoft Word 2016 > Word Options > Security

Key Policy Configurations

Policy Name GPO State Registry Mapping
Remove personal information from file properties on save Enabled HKCU\Software\Policies\Microsoft\office\16.0\word\options > RemovePersonalInformation = 1
Warn if document contains tracked changes or comments before saving Enabled HKCU\Software\Policies\Microsoft\office\16.0\word\options > WarnAboutPersonalInformation = 1
Turn off Document Inspector modules Disabled (Ensure all modules remain active) Ensures end users cannot disable specific inspection criteria.

Automating Batch Document Sanitisation with PowerShell

For administrative teams tasked with scrubbing hundreds of archived contracts before public release or legal discovery, PowerShell can manipulate the Open XML ZIP container directly without opening the Word application GUI:

# Automated Open XML Core Properties Sanitisation Script
param (
    [Parameter(Mandatory=$true)]
    [string]$DocumentPath
)

# Open the .docx file as a ZIP archive
Add-Type -AssemblyName System.IO.Compression.FileSystem
$zip = [System.IO.Compression.ZipFile]::Open($DocumentPath, "Update")

# Locate core.xml metadata entry
$coreEntry = $zip.GetEntry("docProps/core.xml")
if ($coreEntry) {
    $stream = $coreEntry.Open()
    $reader = New-Object System.IO.StreamReader($stream)
    [xml]$xml = $reader.ReadToEnd()
    $reader.Close()
    $stream.Close()

    # Clear sensitive metadata nodes
    $ns = New-Object System.Xml.XmlNamespaceManager($xml.NameTable)
    $ns.AddNamespace("dc", "http://purl.org/dc/elements/1.1/")
    $ns.AddNamespace("cp", "http://schemas.openxmlformats.org/package/2006/metadata/core-properties")

    $xml.SelectSingleNode("//dc:creator", $ns).InnerText = "Sanitised"
    $xml.SelectSingleNode("//cp:lastModifiedBy", $ns).InnerText = "Sanitised"

    # Write back clean XML to entry
    $stream = $coreEntry.Open()
    $stream.SetLength(0)
    $writer = New-Object System.IO.StreamWriter($stream)
    $xml.Save($writer)
    $writer.Close()
    $stream.Close()
}

$zip.Dispose()
Write-Host "Metadata successfully scrubbed from $DocumentPath" -ForegroundColor Green

Troubleshooting Document Inspector and Sanitisation Anomalies

Consult this diagnostic matrix to resolve metadata scrubbing conflicts:

Symptom Underlying Root Cause Remediation Procedure
“Document Inspector cannot remove these items for you” warning on Track Changes. Document is locked for tracked revisions with password protection. Navigate to Review > Protect > Restrict Editing and stop protection before running Document Inspector.
“Remove personal information on save” setting is greyed out. Document is saved in legacy Word 97-2003 binary format (.doc) or document is in Read-Only mode. Save the file as modern .docx format via File > Save As, then re-enable the Trust Center privacy option.
Comments re-appear under author name “Author” after scrubbing. Document Inspector does not delete comment bodies; it anonymises the attribution string. To completely eliminate comments, right-click the comment in the margin and choose Delete Comment, or select Delete All Comments in Document on the Review Ribbon.
Scrubbed document causes formatting shifts in headers. Header inspection removed unlinked section headers that held critical margin spacing codes. Inspect document visual layout post-scrubbing. Ensure page numbering fields (PAGE and NUMPAGES) were not removed as text watermarks.

By enforcing automated inspection routines, configuring GPO privacy flags, and understanding the Open XML packaging architecture, enterprise organisations eliminate unintentional information disclosure and preserve digital privacy across all distributed documentation.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.