列表对象(Word)List object (Word)

表示已应用于文档中指定段落的列表格式。Represents a single list format that's been applied to specified paragraphs in a document. 列表 对象是 列出 的成员 集合。The List object is a member of the Lists collection.

说明Remarks

使用列表(索引),其中索引是索引号,返回单个列表对象。Use Lists (Index), where Index is the index number, to return a single List object. 下面的示例返回活动文档中列表 1 的项的数目。The following example returns the number of items in list one in the active document.

mycount = ActiveDocument.Lists(1).CountNumberedItems

若要返回所有具有列表格式的段落,请使用 ListParagraphs 属性。To return all the paragraphs that have list formatting, use the ListParagraphs property. 若要将这些属性恢复为范围,使用 范围 属性。To return them as a range, use the Range property.

若要将不同的列表格式应用到现有的列表,请使用 ApplyListTemplate 列表 对象的方法。To apply a different list format to an existing list, use the ApplyListTemplate method with the List object. 若要向文档中添加一个新的列表,使用 ApplyListTemplate ListFormat 对象方法为指定的范围。To add a new list to a document, use the ApplyListTemplate method with the ListFormat object for a specified range.

使用 CanContinuePreviousList 若要确定是否可以继续从以前应用于该文档的列表格式的列表的方法。Use the CanContinuePreviousList method to determine whether you can continue the list formatting from a list that was previously applied to the document.

使用 CountNumberedItems 要返回的项目数中的编号或项目符号的列表,包括 LISTNUM 域的方法。Use the CountNumberedItems method to return the number of items in a numbered or bulleted list, including LISTNUM fields.

若要确定列表中是否包含多个列表模板,请使用 SingleListTemplate 属性。To determine whether a list contains more than one list template, use the SingleListTemplate property.

您可以处理文档中的单个List对象,但若要更精确地控制,应使用ListFormat对象。You can manipulate the individual List objects within a document, but for more precise control you should work with the ListFormat object.

备注

[!注释] 图片项目符号列表不包括 列出 集合中并且不能使用 列表中 的对象进行操作。Picture-bulleted lists are not included in the Lists collection and cannot be manipulated using the List object.

方法Methods

名称Name
ApplyListTemplateApplyListTemplate
ApplyListTemplateWithLevelApplyListTemplateWithLevel
CanContinuePreviousListCanContinuePreviousList
ConvertNumbersToTextConvertNumbersToText
CountNumberedItemsCountNumberedItems
RemoveNumbersRemoveNumbers

属性Properties

名称Name
ApplicationApplication
CreatorCreator
ListParagraphsListParagraphs
ParentParent
RangeRange
SingleListTemplateSingleListTemplate
StyleNameStyleName

另请参阅See also

Word 对象模型参考Word Object Model Reference

支持和反馈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.