DocumentInspector.Fix method (Office)

Performs an action on specific information items or document properties depending on the Document Inspector module specified.

Syntax

expression.Fix(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 the results of the action. Results is an output parameter.

Remarks

There are two Document Inspector modules that are included with Microsoft Office. These are the Comments/Revisions module and the Document Properties method. These are the first two options that show up in the Document Inspector dialog box, but are not available in the DocumentInspectors collection.

Example

The following example demonstrates implementing the Fix method of the DocumentInspector object. You specify which Document Inspector module to execute with the index value specified in the DocumentInspectors collection. Before executing this method, you would likely run the Inspect method to determine if there are any hidden worksheets in the workbook.

Public Sub DI_FixDocument() 
Dim docStatus As MsoDocInspectorStatus 
Dim result As String 
ActiveDocument.DocumentInspectors(3).Fix docStatus, result 
 
MsgBox ("The Fix method 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.