Table of contents
Collapse the table of content
Expand the table of content

ParagraphFormat.KeepWithNext Property (Publisher)

office 365 dev account|Last Updated: 8/24/2017
3 Contributors

Sets or returns an MsoTriState that indicates whether the following paragraph will remain in the same text box as the specified paragraph. Read/write.


expression. KeepWithNext

_expression_A variable that represents a ParagraphFormat object.

Return Value



The purpose of keep with next is to prevent hanging headings in a document. To do, you may set this property to msoTrue for all headings.

The default setting for this property is msoFalse.


This example sets the KeepWithNext property to msoTrue for the specified ParagraphFormat object.

Dim objParaForm As ParagraphFormat 
Set objParaForm = ActiveDocument.Pages(1).Shapes(1) _ 
objParaForm.KeepWithNext = msoTrue
© 2018 Microsoft