AutoSummarize Method

Microsoft Word Visual Basic

expression.AutoSummarize(Length, Mode, UpdateProperties)

expression    Required. An expression that returns a Document object.

Length    Optional Variant. The length of the summary as a percentage of the total document length (the larger the number, the more detail that's included in the summary).

Mode    Optional Variant. Specifies the way the summary is displayed. Can be one of the following WdSummaryMode constants.

WdSummaryMode can be one of these WdSummaryMode constants.
wdSummaryModeHighlight Highlights the key points in the specified document and displays the AutoSummarize toolbar.
wdSummaryModeInsert Inserts a summary at the beginning of the specified document.
wdSummaryModeCreateNew Creates a new document and inserts the summary.
wdSummaryModeHideAllButSummary Hides everything except the summary and displays the AutoSummarize toolbar.

UpdateProperties    Optional Variant. True to update the Keyword and Comments boxes in the Properties dialog box to reflect the content of the summary for the specified document.

Example

This example creates an automatic summary of the active document by highlighting its key points.

ActiveDocument.AutoSummarize Length:=30, _
    Mode:=wdSummaryModeHighlight, _
    UpdateProperties:=True