Share via


DocumentBase.SummaryViewMode Property

Gets or sets the way a summary is displayed.

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 SummaryViewMode As WdSummaryMode
public WdSummaryMode SummaryViewMode { get; set; }

Property Value

Type: Microsoft.Office.Interop.Word.WdSummaryMode
One of the WdSummaryMode values.

Remarks

This property corresponds to the Type of summary options in the AutoSummarize dialog box.

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