Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Description

Excerpt

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.)

Signature
C#
C#
 public boolean KeepWithNext{ get; set; }
Signature
vb.net
vb.net
Public Property KeepWithNext() As Boolean
Remarks

MS Word equivalent: Format menu > Paragraph... > Line and Page Breaks tab > Pagination section > Keep with next

Example
Code Block
csharp
csharp
titleC#

          //--- Return KeepWithNext
          bool keepWithNext = oParagraphFormatting.KeepWithNext;

          //--- Set KeepWithNext
          oParagraphFormatting.KeepWithNext = true;
        
Code Block
vb.net
vb.net
titlevb.net

          '--- Return KeepWithNext
          Dim keepWithNext As Boolean = oParagraphFormatting.KeepWithNext

          '--- Set KeepWithNext
          oParagraphFormatting.KeepWithNext = True