Column.Sort method (Word)
Sorts the specified table column.
expression.Sort ( _ExcludeHeader_
, _SortFieldType_
, _SortOrder_
, _CaseSensitive_
, _BidiSort_
, _IgnoreThe_
, _IgnoreKashida_
, _IgnoreDiacritics_
, _IgnoreHe_
, _LanguageID_
)
expression Required. A variable that represents a 'Column' object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
ExcludeHeader | Optional | Variant | True to exclude the first row or paragraph header from the sort operation. The default value is False. |
SortFieldType | Optional | Variant | The sort type for the column. Can be one of the WdSortFieldType constants. |
SortOrder | Optional | Variant | The sorting order to use for the column. Can be one WdSortOrder constant. |
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. This argument may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed. |
IgnoreThe | Optional | Variant | True to ignore the Arabic character alef lam when sorting right-to-left language text. This argument may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed. |
IgnoreKashida | Optional | Variant | True to ignore kashidas when sorting right-to-left language text. This argument may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed. |
IgnoreDiacritics | Optional | Variant | True to ignore bidirectional control characters when sorting right-to-left language text. This argument may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed. |
IgnoreHe | Optional | Variant | True to ignore the Hebrew character he when sorting right-to-left language text. This argument may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed. |
LanguageID | Optional | Variant | Specifies the sorting language. Can be one of the WdLanguageID constants. |
If you want to sort paragraphs within a table cell, include only the paragraphs and not the end-of-cell mark; if you include the end-of-cell mark in a selection or range and then attempt to sort the paragraphs, Word displays a message stating that it found no valid records to sort.
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.