AutoSummarize Method

Applies To

Document object.

Description

Creates an automatic summary of the specified document, and returns a Range object. Corresponds to the options in AutoSummarize command (Tools menu).

Syntax

expression.AutoSummarize(Length, Mode, UpdateProperties)

expression   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.

Constant

Description

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 comment text in the Properties dialog box (File menu) to reflect the content of the summary for the specified document.

See Also

SummaryLength property, SummaryViewMode property, UpdateSummaryProperties method.

Example

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

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