Skip to end of metadata
Go to start of metadata

Description

Sets or returns a boolean representing if Word will use Widow Control for a paragraph. When set to true, Word will not print the last line of a paragraph by itself at the top of a page (widow) or the first line of a paragraph by itself at the bottom of a page (orphan).

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

Remarks

The default value for a new paragraph is true.

MS Word equivalent: Format menu > Paragraph... > Line and Page Breaks tab > Pagination section > Widow/Orphan control

Examples

C#

          //--- Return WidowControl
          bool widowControl = oParagraphFormatting.WidowControl;

          //--- Set WidowControl
          oParagraphFormatting.WidowControl = false;
        
vb.net

          '--- Return WidowControl
          Dim widowControl As Boolean = oParagraphFormatting.WidowControl

          '--- Set WidowControl
          oParagraphFormatting.WidowControl = False
        
  • No labels