Selection.SortByHeadings (Word)

Sorts the headings in the specified selection.

SortByHeadings (SortFieldType, SortOrder, CaseSensitive, BidiSort, IgnoreThe, IgnoreKashida, IgnoreDiacritics, IgnoreHe, LanguageID)


Selection.SortByHeadings

Arguments

Optional arguments

The following arguments are optional

SortFieldType (WdSortFieldType) - The sort field type to use. Can be one of the WdSortFieldType constants. The default value is wdSortFieldAlphanumeric. Depending on the language support (U.S. English, for example) that you have selected or installed, some of these constants may not be available to you.


Possible values are

wdSortFieldAlphanumeric Alphanumeric order.
wdSortFieldDate Date order.
wdSortFieldJapanJIS Japanese JIS order.
wdSortFieldKoreaKS Korean KS order.
wdSortFieldNumeric Numeric order.
wdSortFieldStroke Stroke order.
wdSortFieldSyllable Syllable order.

SortOrder (WdSortOrder) - The sorting order to use. Can be one of the WdSortOrder constants.

Possible return values are wdSortOrderAscending - Ascending order. Default, wdSortOrderDescending - Descending order.

CaseSensitive (Boolean) - True to sort with case sensitivity. The default value is False.

BidiSort (Boolean) - True to sort based on right-to-left language rules. Depending on the language support (U.S. English, for example) that you have selected or installed, this parameter may not be available to you.

IgnoreThe (Boolean) - True to ignore the Arabic character alef lam when sorting right-to-left language text. Depending on the language support (U.S. English, for example) that you have selected or installed, this parameter may not be available to you.

IgnoreKashida (Boolean) - True to ignore kashidas when sorting right-to-left language text. Depending on the language support (U.S. English, for example) that you have selected or installed, this parameter may not be available to you.

IgnoreDiacritics (Boolean) - True to ignore bidirectional control characters when sorting right-to-left language text. Depending on the language support (U.S. English, for example) that you have selected or installed, this parameter may not be available to you.

IgnoreHe (Boolean) - True to ignore the Hebrew character he when sorting right-to-left language text. Depending on the language support (U.S. English, for example) that you have selected or installed, this parameter may not be available to you.

LanguageID (WdLanguageID) - Specifies the sorting language. Can be one of the WdLanguageID constants.

Here you can find possible values for WdLanguageID