This documentation is archived and is not being maintained.

Using the Document Inspector

Office 2007

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.

Aa434508.vs_note(en-us,office.12).gif  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 2007, Microsoft Office Excel 2007, and Microsoft Office PowerPoint 2007, which are part of the 2007 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 2007 Microsoft Office system includes these built-in modules:
For Excel:

  • Comments and Annotations
  • Document Properties and Personal Information
  • Headers and Footers
  • Hidden Rows and Columns
  • Hidden Worksheets
  • Invisible Content
For PowerPoint:
  • Comments and Annotations
  • Document Properties and Personal Information
  • Invisible On-Slide Content
  • Off-slide Content
  • Presentation Notes
For Word:
  • Comments, Revisions, Versions, and Annotations
  • Document Properties and Personal Information. This includes metadata, Microsoft SharePoint properties, custom properties, and other content information.
  • Headers, Footers, and Watermarks
  • Hidden Text

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 2007 Microsoft Office Object Model for the Document Inspector

To implement the Document Inspector programmatically, the 2007 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

PropertyCount (read-only)
PropertyItem (read only)
PropertyApplication (read-only)
PropertyCreator (read-only)
PropertyParent (read-only)
The following table lists the members of the DocumentInspector object:
PropertyName (read-only)
PropertyDescription (read-only)
PropertyApplication (read-only)
PropertyCreator (read-only)
PropertyParent (read-only)
MethodInspect(Doc, MsoDocInspectorStatus, Result)
MethodFix(MsoDocInspectorStatus, Result)
Enumerationenum MsoDocInspectorStatus