Class ListFormat (Word VBA)

The class ListFormat represents the list formatting attributes that can be applied to the paragraphs in a range.

Set

To use a ListFormat class variable it first needs to be instantiated, for example

Dim lft as ListFormat
Set lft = ActiveDocument.Range.ListFormat

ListFormat class variables can be set using the Range.ListFormat procedure.

Methods

Other Methods

ApplyBulletDefault - Adds bullets and formatting to the paragraphs in the range for the specified ListFormat object.

ActiveDocument.Range.ListFormat.ApplyBulletDefault

ApplyListTemplate - Applies a set of list-formatting characteristics to the specified ListFormat object.

ActiveDocument.Range.ListFormat.ApplyListTemplate ListTemplate:=

ApplyListTemplateWithLevel - Applies a set of list-formatting characteristics, optionally for a specified level.

ActiveDocument.Range.ListFormat.ApplyListTemplateWithLevel ListTemplate:=

ApplyNumberDefault - Adds the default numbering scheme to the paragraphs in the range for the specified ListFormat object.

ActiveDocument.Range.ListFormat.ApplyNumberDefault

ApplyOutlineNumberDefault - Adds the default outline-numbering scheme to the paragraphs in the range for the specified ListFormat object.

ActiveDocument.Range.ListFormat.ApplyOutlineNumberDefault

CanContinuePreviousList - Returns a WdContinue constant (wdContinueDisabled, wdResetList, or wdContinueList) that indicates whether the formatting from the previous list can be continued.

Dim wceCanContinuePreviousList As WdContinue
wceCanContinuePreviousList = ActiveDocument.Range.ListFormat.CanContinuePreviousList(ListTemplate:=)

ConvertNumbersToText - Changes the list numbers and LISTNUM fields in the specified ListFormat object to text.

ActiveDocument.Range.ListFormat.ConvertNumbersToText

CountNumberedItems - Returns the number of bulleted or numbered items and LISTNUM fields in the specified ListFormat object.

Dim lngCountNumberedItems As Long
lngCountNumberedItems = ActiveDocument.Range.ListFormat.CountNumberedItems()

RemoveNumbers - Removes numbers or bullets from the specified list.

ActiveDocument.Range.ListFormat.RemoveNumbers

Properties

List returns a List object that represents the first formatted list contained in the specified ListFormat object.

Dim lstList As List
Set lstList = ActiveDocument.Range.ListFormat.List

ListLevelNumber returns or sets the list level for the first paragraph in the specified ListFormat object.

ActiveDocument.Range.ListFormat.ListLevelNumber =

ListPictureBullet returns the InlineShape object that represents the picture used as a bullet in a picture bulleted list.

Dim iseListPictureBullet As InlineShape
Set iseListPictureBullet = ActiveDocument.Range.ListFormat.ListPictureBullet

ListString returns a String that represents the appearance of the list value of the first paragraph in the range for the specified ListFormat object. For example, the second paragraph in an alphabetical list would return B.

Dim strListString As String
strListString = ActiveDocument.Range.ListFormat.ListString

ListTemplate returns a ListTemplate object that represents the list formatting for the specified ListFormat object.

Dim lteListTemplate As ListTemplate
Set lteListTemplate = ActiveDocument.Range.ListFormat.ListTemplate

ListType returns the type of lists that are contained in the range for the specified ListFormat object.

Dim wltListType As WdListType
wltListType = ActiveDocument.Range.ListFormat.ListType

ListValue returns the numeric value of the first paragraph in the range for the specified ListFormat object.

Dim lngListValue As Long
lngListValue = ActiveDocument.Range.ListFormat.ListValue

Parent returns an object that represents the parent object of the specified ListFormat object.

Dim objParent As Object
Set objParent = ActiveDocument.Range.ListFormat.Parent

SingleList true if the specified ListFormat object contains only one list.

Dim booSingleList As Boolean
booSingleList = ActiveDocument.Range.ListFormat.SingleList

SingleListTemplate true if the entire ListFormat object uses the same list template.

Dim booSingleListTemplate As Boolean
booSingleListTemplate = ActiveDocument.Range.ListFormat.SingleListTemplate