NextParagraphStyle Property

Microsoft Word Visual Basic

NextParagraphStyle Property

       

Returns or sets the style to be applied automatically to a new paragraph inserted after a paragraph formatted with the specified style. To set this property, specify either the local name of the next style, an integer or a WdBuiltinStyle constant, or an object that represents the next style. Read/write Variant.

For a list of the WdBuiltinStyle constants, see the Style property.

expression.NextParagraphStyle

expression   Required. An expression that returns a Style  object.

Example

This example sets the Heading 1 style to be followed by the Heading 2 style in the active document.

ActiveDocument.Styles(wdStyleHeading1).NextParagraphStyle = _
    ActiveDocument.Styles(wdStyleHeading2)

This example creates a new document and adds a paragraph style named "MyStyle." The new style is based on the Normal style, is followed by the Heading 3 style, has a left indent of 1 inch (72 points), and is formatted as bold.

Set myDoc = Documents.Add
Set myStyle = myDoc.Styles.Add(Name:= "MyStyle")
    With myStyle
        .BaseStyle = wdStyleNormal
        .NextParagraphStyle = wdStyleHeading3
        .ParagraphFormat.LeftIndent = 72
        .Font.Bold = True
    End With