SortByHeadings Method
TOC
Collapse the table of content
Expand the table of content

Selection.SortByHeadings Method (Word)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Sorts the headings in the specified selection.

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

expression A variable that represents a Selection object.

Parameters

Name

Required/Optional

Data type

Description

SortFieldType

Optional

VARIANT

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.

SortOrder

Optional

VARIANT

The sorting order to use. Can be one of the WdSortOrder constants.

CaseSensitive

Optional

VARIANT

True to sort with case sensitivity. The default value is False.

BidiSort

Optional

VARIANT

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

Optional

VARIANT

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

Optional

VARIANT

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

Optional

VARIANT

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

Optional

VARIANT

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

Optional

VARIANT

Specifies the sorting language. Can be one of the WdLanguageID constants.

Return value

VOID

Concepts

Other resources

Show:
© 2016 Microsoft