SortByHeadings 方法 (Word)Selection.SortByHeadings method (Word)

对指定的选定内容中的标题进行排序。Sorts the headings in the specified selection.

语法Syntax

表达式SortByHeadings(SortFieldTypeSortOrderCaseSensitiveBidiSortIgnoreTheIgnoreKashidaIgnoreDiacriticsIgnoreHeLanguageID)expression.SortByHeadings (SortFieldType, SortOrder, CaseSensitive, BidiSort, IgnoreThe, IgnoreKashida, IgnoreDiacritics, IgnoreHe, LanguageID)

_表达式_一个代表**Selection** 对象的变量。expression A variable that represents a Selection object.

参数Parameters

名称Name 必需/可选Required/Optional 数据类型Data type 说明Description
SortFieldTypeSortFieldType 可选Optional VariantVariant 要使用的排序字段类型。The sort field type to use. 可以是 WdSortFieldType 常量之一。Can be one of the WdSortFieldType constants. 默认值是 wdSortFieldAlphanumericThe 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.
SortOrderSortOrder 可选Optional VariantVariant 要使用的排序顺序。The sorting order to use. 可以是**WdSortOrder** 常量之一。Can be one of the WdSortOrder constants.
CaseSensitiveCaseSensitive 可选Optional VariantVariant 要排序时区分大小写。True to sort with case sensitivity. 默认值为 FalseThe default value is False.
BidiSortBidiSort 可选Optional VariantVariant 要排序按照从右到左语言规则。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.
IgnoreTheIgnoreThe 可选Optional VariantVariant 要忽略阿拉伯语字符 alef lam 从右向左的语言文本进行排序时。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.
IgnoreKashidaIgnoreKashida 可选Optional VariantVariant 从右向左的语言文本进行排序时忽略 kashida。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.
IgnoreDiacriticsIgnoreDiacritics 可选Optional VariantVariant 从右向左的语言文本进行排序时忽略双向控制字符。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.
IgnoreHeIgnoreHe 可选Optional VariantVariant 要忽略希伯来字符 he 从右向左的语言文本进行排序时。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.
LanguageIDLanguageID 可选Optional VariantVariant 指定排序语言。Specifies the sorting language. 可以是 WdLanguageID 常量之一。Can be one of the WdLanguageID constants.

返回值Return value

作废VOID

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.