The Document Inspector provides a central location for users to examine their documents for personal or sensitive information, text phrases, or other document contents. They can then use the Document Inspector to more easily remove unwanted information before distributing the document.

Note
Microsoft does not support automatically removing hidden information for signed or protected documents, or for documents using Information Rights Management (IRM). We recommend that you run the Document Inspector before signing or invoking IRM on these documents.

As a developer, you can extend the Document Inspector. The Document Inspector framework enables you to deploy custom Document Inspector modules that you can integrate into the user interface, in addition to the built-in Document Inspector modules.

You will find these enhancements to the Document Inspector in Microsoft Office Word, Microsoft Office Excel, and Microsoft Office PowerPoint, which are part of the Microsoft Office system.

Built-in Document Inspector Modules

The Document Inspector is composed of modules that users can use to inspect and fix specific portions of the document. The Document Inspector in the Microsoft Office system includes these built-in modules:
For Excel:

For PowerPoint: For Word:

Opening the Document Inspector

To open the Document Inspector:

  1. On the File menu, point to Prepare.
  2. Click Inspect Document.
The Document Inspector dialog box appears where you select the type of data for the search.the document inspector dialog box

After the modules complete the inspection, a dialog box appears that displays the results from the inspections with a button that enables you to remove the data found in each module. If you choose to remove the data for the module, the descriptive text for each module indicates whether the operation was successful or not. If the Document Inspector encounters errors during the operation, the module is flagged and displays an error message. The data for that module does not change.

Additions to the Microsoft Office Object Model for the Document Inspector

To implement the Document Inspector programmatically, the Microsoft Office system adds a new DocumentInspectors collection type to the object models for Word, Excel, and PowerPoint. The DocumentInspectors collection is part of the Document object in Word, the Workbook object in Excel, and the Presentation object in PowerPoint. A DocumentInspectors collection contains multiple DocumentInspector objects, one for each built-in module. The following table lists the properties of the DocumentInspectors collection

Type Name
Property Count (read-only)
Property Item (read only)
Property Application (read-only)
Property Creator (read-only)
Property Parent (read-only)
The following table lists the members of the DocumentInspector object:
Type Name
Property Name (read-only)
Property Description (read-only)
Property Application (read-only)
Property Creator (read-only)
Property Parent (read-only)
Method Inspect(Doc, MsoDocInspectorStatus, Result)
Method Fix(MsoDocInspectorStatus, Result)
Enumeration enum MsoDocInspectorStatus
...msoDocInspectorStatusIssueFound
...msoDocInspectorStatusDocOk
...msoDocInspectorStatusError