Description
Sets or returns a boolean that represents if Word attempts to keep a paragraph on the same page as the next paragraph. (It prevents a page break a paragraph and the next paragraph.)
C#
public boolean KeepWithNext{ get; set; }
vb.net
Public Property KeepWithNext() As Boolean
Remarks
MS Word equivalent: Format menu > Paragraph... > Line and Page Breaks tab > Pagination section > Keep with nextExamples
C#
//--- Return KeepWithNext
bool keepWithNext = oParagraphFormatting.KeepWithNext;
//--- Set KeepWithNext
oParagraphFormatting.KeepWithNext = true;
vb.net
'--- Return KeepWithNext
Dim keepWithNext As Boolean = oParagraphFormatting.KeepWithNext
'--- Set KeepWithNext
oParagraphFormatting.KeepWithNext = True
