DocumentBase.AutoSummarize Method

Creates an automatic summary of the document.

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


Public Function AutoSummarize ( _
    ByRef length As Object, _
    ByRef mode As Object, _
    ByRef updateProperties As Object _
) As Range
public Range AutoSummarize(
    ref Object length,
    ref Object mode,
    ref Object updateProperties


  • length
    Type: System.Object%

    The length of the summary as a percentage of the total document length (the larger the number, the more detail is included in the summary).

  • updateProperties
    Type: System.Object%

    true to update the Keyword and Comments boxes in the Properties dialog box to reflect the content of the summary for the document.

Return Value

Type: Microsoft.Office.Interop.Word.Range
A Range that includes the summary of the document.


The values of the Mode parameter correspond to the options in the AutoSummarize dialog box.

Optional Parameters

For information on optional parameters, see Optional Parameters in Office Solutions.


The following code example uses the AutoSummarize method to create an automatic summary of the active document by creating a new document and inserting the specified summary. This example assumes that the current document is not empty. To use this example, run it from the ThisDocument class in a document-level project.

Private Function DocumentAddSummary() As Word.Range

    Return Me.AutoSummarize(Length:=30, _
        Mode:=Word.WdSummaryMode.wdSummaryModeCreateNew, _
End Function
private Word.Range DocumentAddSummary()
    object length = 30;
    object mode = Word.WdSummaryMode.wdSummaryModeCreateNew;
    object updateProperties = true;

    return this.AutoSummarize(ref length, ref mode, ref updateProperties);

.NET Framework Security

See Also


DocumentBase Class

Microsoft.Office.Tools.Word Namespace