Skip to end of metadata
Go to start of metadata

Description

Sets or returns a boolean that represents if Word attempts to keep all lines of a paragraph on the same page. (It prevents a page break within a paragraph.)

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

Remarks

MS Word equivalent: Format menu > ParagraphFormatting... > Line and Page Breaks tab > Pagination section > Keep lines together

Examples

C#

          //--- Return KeepLinesTogether
          bool keepLinesTogether = oParagraphFormatting.KeepLinesTogether;

          //--- Set KeepLinesTogether
          oParagraphFormatting.KeepLinesTogether = true;
        
vb.net

          '--- Return KeepLinesTogether
          Dim keepLinesTogether As Boolean = oParagraphFormatting.KeepLinesTogether

          '--- Set KeepLinesTogether
          oParagraphFormatting.KeepLinesTogether = True
        
  • No labels