DocumentInspector.Fix Method

Office Developer Reference

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 that staus 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

MsoDocInspectorStatus members

Constant Value
msoDocInspectorStatusDocOk 0
msoDocInspectorStatusIssueFound 1
msoDocInspectorStatusError 2

Remarks

There are two Document Inspector modules that are included with the 2007 Microsoft Office system. 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.

Visual Basic for Applications
  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