DocumentInspector.Inspect method (Office)

Inspects a document for specific information or document properties.

Syntax

expression.Inspect(Status, Results)

expression An expression that returns a DocumentInspector object.

Parameters

Name Required/Optional Data type Description
Status Required MsoDocInspectorStatus An enumeration representing the status of the document. Status is an output parameter, which means that its value is returned when the method has completed its purpose.
Results Required String Contains a list of the information items or document properties found in the document.

Example

The following example inspects a document by using the Inspect method of the DocumentInspector object, and then displays the status and results of the inspection.

Public Sub DI_InspectDocument() 
Dim docStatus As MsoDocInspectorStatus 
Dim result As String 
ActiveDocument.DocumentInspectors(1).Inspect docStatus, results 
 
MsgBox ("The inspection returned the following status " & docStatus & _ 
" with this result " & result) 
End Sub

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.