Udostępnij za pośrednictwem


WorkbookBase.DocumentInspectors Właściwość

Definicja

Pobiera kolekcję modułów inspektora dokumentów dla skoroszytu.

public:
 property Microsoft::Office::Core::DocumentInspectors ^ DocumentInspectors { Microsoft::Office::Core::DocumentInspectors ^ get(); };
public Microsoft.Office.Core.DocumentInspectors DocumentInspectors { get; }
member this.DocumentInspectors : Microsoft.Office.Core.DocumentInspectors
Public ReadOnly Property DocumentInspectors As DocumentInspectors

Wartość właściwości

Kolekcja Microsoft.Office.Core.DocumentInspectors zawierająca moduły Document Inspector dla skoroszytu.

Przykłady

Poniższy przykład kodu wykonuje iterację po inspektorach w skoroszycie. Kod sprawdza każdy z nich i wyświetla okno komunikatu, które wyświetla nazwę inspektora oraz stan i wyniki inspekcji.

Ten przykład dotyczy dostosowywania na poziomie dokumentu.

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);
    }
}
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

Dotyczy