Workbook.DocumentInspectors Property (2007 System)
Gets the collection of Document Inspector modules for the workbook.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)
Syntax
'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property DocumentInspectors As DocumentInspectors
'Usage
Dim instance As Workbook
Dim value As DocumentInspectors
value = instance.DocumentInspectors
[BrowsableAttribute(false)]
public DocumentInspectors DocumentInspectors { get; }
[BrowsableAttribute(false)]
public:
property DocumentInspectors^ DocumentInspectors {
DocumentInspectors^ get ();
}
public function get DocumentInspectors () : DocumentInspectors
Property Value
Type: DocumentInspectors
A Microsoft.Office.Core.DocumentInspectors collection that contains the Document Inspector modules for the workbook.
Examples
The following code example iterates through the inspectors in the workbook. The code inspects each one 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 Sub GetDocumentInspectors()
For Each insp As Office.DocumentInspector In Me.DocumentInspectors
Dim status As Office.MsoDocInspectorStatus
Dim results As String = String.Empty
insp.Inspect(status, results)
MessageBox.Show("Inspector Name: " + insp.Name + vbCrLf _
+ "Status: " + status.ToString() + vbCrLf + "Results: " _
+ results)
Next
End Sub
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);
}
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.