NextParagraphStyle Property

Microsoft Word Visual Basic

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