Aracılığıyla paylaş


DocumentBase.ComputeStatistics Yöntem

Belge içeriğini temel alarak bir istatistik alır.

Ad alanı:  Microsoft.Office.Tools.Word
Derleme:  Microsoft.Office.Tools.Word.v4.0.Utilities (Microsoft.Office.Tools.Word.v4.0.Utilities.dll içinde)

Sözdizimi

'Bildirim
Public Function ComputeStatistics ( _
    statistic As WdStatistic, _
    ByRef includeFootnotesAndEndnotes As Object _
) As Integer
public int ComputeStatistics(
    WdStatistic statistic,
    ref Object includeFootnotesAndEndnotes
)

Parametreler

  • includeFootnotesAndEndnotes
    Tür: System.Object%
    true dipnotlar ve sonnotlar istatistikleri hesaplama işlemlerinde kullanılacak.Varsayılan değer false olur.

Dönüş Değeri

Tür: System.Int32
Tarafından belirtilen türde öğe sayısı Statistic olan parametre.

Notlar

İsteğe bağlı parametreler

İsteğe bağlı parametreler hakkında daha fazla bilgi için bkz: Office Çözümlerinde İsteğe Bağlı Parametreler.

Örnekler

Aşağıdaki kod örneğinde ComputeStatistics sözcük sayısı dipnotları ve sonnotları hariç olmak üzere belgede görüntülemek için yöntem.Bu örneği kullanmak için çalıştırın ThisDocument bir belge düzeyi projesinde sınıf.

Private Sub DocumentComputeStatistics()
    Dim wordCount As Integer = Me.ComputeStatistics( _
        Word.WdStatistic.wdStatisticWords, False)
    MessageBox.Show(("There are " + wordCount.ToString() + _
        " words in this document."))
End Sub
private void DocumentComputeStatistics()
{
    object IncludeFootnotesAndEndnotes = false;

    int wordCount = this.ComputeStatistics(
        Word.WdStatistic.wdStatisticWords,
        ref IncludeFootnotesAndEndnotes);
    MessageBox.Show("There are " + wordCount.ToString() +
        " words in this document.");
}

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

DocumentBase Sınıf

Microsoft.Office.Tools.Word Ad Alanı