Share via


DocumentBase.SummaryLength Property

Gets or sets the length of the summary as a percentage of the document length.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

Syntax

'Declaration
Public Property SummaryLength As Integer
    Get
    Set
public int SummaryLength { get; set; }

Property Value

Type: System.Int32
The length of the summary as a percentage of the document length.

Remarks

The larger the number, the more detail is included in the summary.

This property takes effect immediately if the AutoSummarize toolbar is displayed; otherwise, it takes effect the next time the AutoSummarize method or the SummaryViewMode property is applied to the document.

Examples

The following code example adds text to the first paragraph of the document. The code then displays the summary and sets the level of detail to 50 percent. To use this example, run it from the ThisDocument class in a document-level project.

Private Sub DocumentSummaryLength()

    Me.Paragraphs(1).Range.InsertParagraphBefore()
    Me.Paragraphs(1).Range.Text = "The SummaryLength property" & _
        " returns or sets the length of the summary as a " & _
        " percentage of the document length. The larger the number," & _
        " the more detail that's included in the summary."

    Me.SummaryViewMode = Word.WdSummaryMode.wdSummaryModeHighlight

    Me.ShowSummary = True
    Me.SummaryLength = 50
End Sub 
private void DocumentSummaryLength()
{

    this.Paragraphs[1].Range.InsertParagraphBefore();
    this.Paragraphs[1].Range.Text = "The SummaryLength property"
        + " returns or sets the length of the summary as a "
        + " percentage of the document length. The larger the number,"
        + " the more detail that's included in the summary.";

    this.SummaryViewMode = Word.WdSummaryMode.wdSummaryModeHighlight;

    this.ShowSummary = true;
    this.SummaryLength = 50;
}

.NET Framework Security

See Also

Reference

DocumentBase Class

Microsoft.Office.Tools.Word Namespace