ListFormat.ApplyOutlineNumberDefault method (Word)

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

Syntax

expression. ApplyOutlineNumberDefault( _DefaultListBehavior_ )

expression Required. A variable that represents a 'ListFormat' object.

Parameters

Name Required/Optional Data type Description
DefaultListBehavior Optional Variant Sets a value that specifies whether Microsoft Word uses new Web-oriented formatting for better list display. Can be either of the following constants: wdWord8ListBehavior (use formatting compatible with Microsoft Word 97) or wdWord9ListBehavior (use Web-oriented formatting). For compatibility reasons, the default constant is wdWord8ListBehavior, but in new procedures you should use wdWord9ListBehavior to take advantage of improved Web-oriented formatting with respect to indenting and multilevel lists.

Remarks

If the paragraphs are already formatted as an outline-numbered list, this method removes the numbers and formatting. This method doesn't remove built-in heading styles that have been applied to paragraphs.

Example

This example adds outline numbering to the paragraphs in the selection. If the selection is already an outline-numbered list, the example removes the numbers and formatting.

Selection.Range.ListFormat.ApplyOutlineNumberDefault

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 is no list formatting, the default outline-numbered list format is applied.

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.ApplyOutlineNumberDefault 
End If

See also

ListFormat Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.