Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Document.DocumentInspectors Property (2007 System)

Gets a DocumentInspectors object that you can use to locate hidden personal information, such as author name, company name, and revision date.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)

[BrowsableAttribute(false)]
public DocumentInspectors DocumentInspectors { get; }

Property Value

Type: DocumentInspectors
A DocumentInspectors object that you can use to locate hidden personal information, such as author name, company name, and revision date.

The following code example iterates through the document inspectors. The code inspects each inspector and shows a message box that displays the name of the inspector, and the status and results of the inspection.

This example is for a document-level customization.

private void GetDocumentInspectors()
{
    foreach (Office.DocumentInspector insp in this.DocumentInspectors)
    {
        Office.MsoDocInspectorStatus status;
        string results = String.Empty;
        insp.Inspect(out status, out results);
        MessageBox.Show("Inspector Name: " + insp.Name + "\r\nStatus: " 
            + status.ToString() + "\r\nResults: " + results);
    }
}

Community Additions

ADD
Show:
© 2015 Microsoft