ListFormat 对象(Word)ListFormat object (Word)

代表可应用于范围中各段落的列表格式属性。Represents the list formatting attributes that can be applied to the paragraphs in a range.

备注Remarks

使用 ListFormat 属性返回的 ListFormat 对象的范围。Use the ListFormat property to return the ListFormat object for a range. 下面的示例对选定内容应用默认的项目符号列表格式。The following example applies the default bulleted list format to the selection.

Selection.Range.ListFormat.ApplyBulletDefault

应用列表格式的简单方法是使用 ApplyBulletDefaultApplyNumberDefaultApplyOutlineNumberDefault 方法一致,分别为第一个列表格式 (不包括 ) 中 项目符号和编号对话框中每个选项卡。An easy way to apply list formatting is to use the ApplyBulletDefault, ApplyNumberDefault, and ApplyOutlineNumberDefault methods, which correspond, respectively, to the first list format (excluding None) on each tab in the Bullets and Numbering dialog box.

若要应用默认格式之外的其他格式,请使用 ApplyListTemplate 方法使您可以指定要应用的列表格式 (列表模板)。To apply a format other than the default format, use the ApplyListTemplate method, which allows you to specify the list format (list template) you want to apply.

使用 列表ListTemplate 返回从指定范围中的第一个段落的列表或列表模板的属性。Use the List or ListTemplate property to return the list or list template from the first paragraph in the specified range.

Range 对象一起使用 ListFormat 属性访问的列表格式属性和方法可为指定范围。Use the ListFormat property with a Range object to access the list formatting properties and methods available for the specified range. 下面的示例将默认的项目符号列表格式应用到活动文档中第二段。The following example applies the default bulleted list format to the second paragraph in the active document.

ActiveDocument.Paragraphs(2).Range.ListFormat.ApplyBulletDefault

但是,如果已在文档中定义了列表,则可以使用Lists属性访问list对象。However, if there is already a list defined in your document, you can access a List object by using the Lists property. 下面的示例更改到 项目符号和编号对话框中的 编号选项卡上的第一个编号格式前面的示例中创建的列表的格式。The following example changes the format of the list created in the preceding example to the first number format on the Numbered tab in the Bullets and Numbering dialog box.

ActiveDocument.Lists(1).ApplyListTemplate _ 
 ListTemplate:=ListGalleries(2).ListTemplates(1)

方法Methods

名称Name
ApplyBulletDefaultApplyBulletDefault
ApplyListTemplateApplyListTemplate
ApplyListTemplateWithLevelApplyListTemplateWithLevel
ApplyNumberDefaultApplyNumberDefault
ApplyOutlineNumberDefaultApplyOutlineNumberDefault
CanContinuePreviousListCanContinuePreviousList
ConvertNumbersToTextConvertNumbersToText
CountNumberedItemsCountNumberedItems
ListIndentListIndent
ListOutdentListOutdent
RemoveNumbersRemoveNumbers

属性Properties

名称Name
ApplicationApplication
CreatorCreator
ListList
ListLevelNumberListLevelNumber
ListPictureBulletListPictureBullet
ListStringListString
ListTemplateListTemplate
ListTypeListType
ListValueListValue
ParentParent
SingleListSingleList
SingleListTemplateSingleListTemplate

另请参阅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.