ApplyNumberDefault Method
Applies To
ListFormat object.
Description
Adds the default numbering scheme to the paragraphs in the range for the specified ListFormat object. If the paragraphs are already formatted as a numbered list, this method removes the numbers and formatting.
Syntax
expression.ApplyNumberDefault
expression Required. An expression that returns a ListFormat object.
See Also
ApplyBulletDefault method, ApplyListTemplate method, ApplyOutlineNumberDefault method, AutoFormatAsYouTypeApplyNumberedLists property, OutlineNumbered property.
Example
This example numbers the paragraphs in the selection. If the selection is already a numbered list, the example removes the numbers and formatting.
Selection.Range.ListFormat.ApplyNumberDefault
This example sets the variable myRange to include paragraphs three through six of the active document, and then it checks to see whether the range contains list formatting. If there's no list formatting, default numbers are applied to the range.
Set myDoc = ActiveDocument
Set myRange = myDoc.Range(Start:= myDoc.Paragraphs(3).Range.Start, _
End:=myDoc.Paragraphs(6).Range.End)
If myRange.ListFormat.ListType = wdListNoNumbering Then
myRange.ListFormat.ApplyNumberDefault
End If