Selection.Sort Method
Sorts the paragraphs in the specified selection.
Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)
Syntax
'Declaration
Sub Sort ( _
ByRef ExcludeHeader As Object, _
ByRef FieldNumber As Object, _
ByRef SortFieldType As Object, _
ByRef SortOrder As Object, _
ByRef FieldNumber2 As Object, _
ByRef SortFieldType2 As Object, _
ByRef SortOrder2 As Object, _
ByRef FieldNumber3 As Object, _
ByRef SortFieldType3 As Object, _
ByRef SortOrder3 As Object, _
ByRef SortColumn As Object, _
ByRef Separator As Object, _
ByRef CaseSensitive As Object, _
ByRef BidiSort As Object, _
ByRef IgnoreThe As Object, _
ByRef IgnoreKashida As Object, _
ByRef IgnoreDiacritics As Object, _
ByRef IgnoreHe As Object, _
ByRef LanguageID As Object, _
ByRef SubFieldNumber As Object, _
ByRef SubFieldNumber2 As Object, _
ByRef SubFieldNumber3 As Object _
)
'Usage
Dim instance As Selection
Dim ExcludeHeader As Object
Dim FieldNumber As Object
Dim SortFieldType As Object
Dim SortOrder As Object
Dim FieldNumber2 As Object
Dim SortFieldType2 As Object
Dim SortOrder2 As Object
Dim FieldNumber3 As Object
Dim SortFieldType3 As Object
Dim SortOrder3 As Object
Dim SortColumn As Object
Dim Separator As Object
Dim CaseSensitive As Object
Dim BidiSort As Object
Dim IgnoreThe As Object
Dim IgnoreKashida As Object
Dim IgnoreDiacritics As Object
Dim IgnoreHe As Object
Dim LanguageID As Object
Dim SubFieldNumber As Object
Dim SubFieldNumber2 As Object
Dim SubFieldNumber3 As Object
instance.Sort(ExcludeHeader, FieldNumber, _
SortFieldType, SortOrder, FieldNumber2, _
SortFieldType2, SortOrder2, FieldNumber3, _
SortFieldType3, SortOrder3, SortColumn, _
Separator, CaseSensitive, BidiSort, _
IgnoreThe, IgnoreKashida, IgnoreDiacritics, _
IgnoreHe, LanguageID, SubFieldNumber, _
SubFieldNumber2, SubFieldNumber3)
void Sort(
ref Object ExcludeHeader,
ref Object FieldNumber,
ref Object SortFieldType,
ref Object SortOrder,
ref Object FieldNumber2,
ref Object SortFieldType2,
ref Object SortOrder2,
ref Object FieldNumber3,
ref Object SortFieldType3,
ref Object SortOrder3,
ref Object SortColumn,
ref Object Separator,
ref Object CaseSensitive,
ref Object BidiSort,
ref Object IgnoreThe,
ref Object IgnoreKashida,
ref Object IgnoreDiacritics,
ref Object IgnoreHe,
ref Object LanguageID,
ref Object SubFieldNumber,
ref Object SubFieldNumber2,
ref Object SubFieldNumber3
)
Parameters
- ExcludeHeader
Type: System.Object%
Optional Object. True to exclude the first row or paragraph header from the sort operation. The default value is False.
- FieldNumber
Type: System.Object%
Optional Object. The fields to sort by. Microsoft Word sorts by FieldNumber, then by FieldNumber2, and then by FieldNumber3.
- SortFieldType
Type: System.Object%
Optional Object. The respective sort types for FieldNumber, FieldNumber2, and FieldNumber3. Can be one of the WdSortFieldType constants.
- SortOrder
Type: System.Object%
Optional Object. The sorting order to use when sorting FieldNumber, FieldNumber2, and FieldNumber3. Can be one of the WdSortOrder constants.
- FieldNumber2
Type: System.Object%
Optional Object. The fields to sort by. Word sorts by FieldNumber, then by FieldNumber2, and then by FieldNumber3.
- SortFieldType2
Type: System.Object%
Optional Object. The respective sort types for FieldNumber, FieldNumber2, and FieldNumber3. Can be one of the WdSortFieldType constants.
- SortOrder2
Type: System.Object%
Optional Object. The sorting order to use when sorting FieldNumber, FieldNumber2, and FieldNumber3. Can be one of the WdSortOrder constants.
- FieldNumber3
Type: System.Object%
Optional Object. The fields to sort by. Word sorts by FieldNumber, then by FieldNumber2, and then by FieldNumber3.
- SortFieldType3
Type: System.Object%
Optional Object. The respective sort types for FieldNumber, FieldNumber2, and FieldNumber3. Can be one of the WdSortFieldType constants.
- SortOrder3
Type: System.Object%
Optional Object. The sorting order to use when sorting FieldNumber, FieldNumber2, and FieldNumber3. Can be one of the WdSortOrder constants.
- SortColumn
Type: System.Object%
Optional Object. True to sort only the column specified by the Selection object.
- Separator
Type: System.Object%
Optional Object. The type of field separator. Can be one of the WdSortSeparator constants.
- CaseSensitive
Type: System.Object%
Optional Object. True to sort with case sensitivity. The default value is False.
- BidiSort
Type: System.Object%
Optional Object. 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’ve selected or installed.
- IgnoreThe
Type: System.Object%
Optional Object. 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’ve selected or installed.
- IgnoreKashida
Type: System.Object%
Optional Object. 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’ve selected or installed.
- IgnoreDiacritics
Type: System.Object%
Optional Object. 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’ve selected or installed.
- IgnoreHe
Type: System.Object%
Optional Object. 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’ve selected or installed.
- LanguageID
Type: System.Object%
Optional Object. LanguageIDOptionalObject. Specifies the sorting language. Can be one of the WdLanguageID constants. Refer to the Object Browser for a list of the WdLanguageID constants.
- SubFieldNumber
Type: System.Object%
Optional Object. (Applies to the Selection object only.)
- SubFieldNumber2
Type: System.Object%
Optional Object. (Applies to the Selection object only.)
- SubFieldNumber3
Type: System.Object%
Optional Object. (Applies to the Selection object only.)