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

簡單的方法來套用清單格式設定為使用 ApplyBulletDefaultApplyNumberDefault ,以及 ApplyOutlineNumberDefault 方法、 對應、 分別為第一個清單格式 (不含 [ 項目符號及編號] 對話方塊中的每個索引標籤。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屬性來存取清單物件。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
清單List
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.