Style.NextParagraphStyle property (Word)
Returns or sets the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. Read/write Variant.
Syntax
expression. NextParagraphStyle
expression An expression that returns a 'Style' object.
Remarks
You can set the NextParagraphStyle property by using the local name of the style, an integer or a WdBuiltinStyle constant, or an object that represents the next style. For a list of the WdBuiltinStyle constants, see the Style property for the object that you want to set.
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
See also
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.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for