SortBy Property

Microsoft Word Visual Basic

Show All

SortBy Property

       

Returns or sets the sorting criteria for the specified index. Read/write WdIndexSortBy.

WdIndexSortBy can be one of these WdIndexSortBy constants.
wdIndexSortBySyllable Sort phonetically.
wdIndexSortByStroke Sort by the number of strokes in a character.

expression.SortBy

expression   Required. An expression that returns an Index object.

Remarks

For more information on using Microsoft Word with right-to-left languages, see Word features for right-to-left languages.

Example

This example sets the first index in the current document to sort by the number of strokes.

ActiveDocument.Indexes(1).SortBy = _
    wdIndexSortByStroke