Edit

Share via


Column.Sort Method

Definition

Sorts the specified table column.

public void Sort (ref object ExcludeHeader, ref object SortFieldType, ref object SortOrder, ref object CaseSensitive, ref object BidiSort, ref object IgnoreThe, ref object IgnoreKashida, ref object IgnoreDiacritics, ref object IgnoreHe, ref object LanguageID);
abstract member Sort : obj * obj * obj * obj * obj * obj * obj * obj * obj * obj -> unit
Public Sub Sort (Optional ByRef ExcludeHeader As Object, Optional ByRef SortFieldType As Object, Optional ByRef SortOrder As Object, Optional ByRef CaseSensitive As Object, Optional ByRef BidiSort As Object, Optional ByRef IgnoreThe As Object, Optional ByRef IgnoreKashida As Object, Optional ByRef IgnoreDiacritics As Object, Optional ByRef IgnoreHe As Object, Optional ByRef LanguageID As Object)

Parameters

ExcludeHeader
Object

A value that indicates whether to exclude the first row or paragraph header from the sort operation. The default value is False.

SortFieldType
Object

The sort type for the column. Can be one of the WdSortFieldType constants.

SortOrder
Object

The sorting order to use for the column. Can be one WdSortOrder constant.

CaseSensitive
Object

A value that indicates whether to sort with case sensitivity. The default value is False.

BidiSort
Object

A value that indicates whether 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’ve selected or installed.

IgnoreThe
Object

A value that indicates whether 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’ve selected or installed.

IgnoreKashida
Object

A value that indicates whether 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’ve selected or installed.

IgnoreDiacritics
Object

A value that indicates whether 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’ve selected or installed.

IgnoreHe
Object

A value that indicates whether 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’ve selected or installed.

LanguageID
Object

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

Remarks

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, Microsoft Word displays a message stating that it found no valid records to sort.

Applies to