ListFormat.CanContinuePreviousList method (Word)

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

Syntax

expression. CanContinuePreviousList( _ListTemplate_ )

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

Parameters

Name Required/Optional Data type Description
ListTemplate Required ListTemplate A list template that's been applied to previous paragraphs in the document.

Remarks

This method returns the state of the Continue previous list and Restart numbering options in the Bullets and Numbering dialog box for a specified list format. To change the settings of these options, set the ContinuePreviousList argument of the ApplyListTemplate method.

Example

This example checks to see whether numbering from a previous list is disabled. If it isn't disabled, the current list template is applied with numbering set to continue from the previous list. The selection must be within the second list, or this example creates an error.

Dim lfTemp As ListFormat 
Dim intContinue As Integer 
 
Set lfTemp = Selection.Range.ListFormat 
 
intContinue = lfTemp.CanContinuePreviousList( _ 
 ListTemplate:=lfTemp.ListTemplate) 
If intContinue <> wdContinueDisabled Then 
 lfTemp.ApplyListTemplate _ 
 ListTemplate:=lfTemp.ListTemplate, _ 
 ContinuePreviousList:=True 
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.