DocumentBase.ConsecutiveHyphensLimit Property

 

Gets or sets the maximum number of consecutive lines that can end with hyphens.

Namespace:   Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

public int ConsecutiveHyphensLimit { get; set; }

Property Value

Type: System.Int32

The maximum number of consecutive lines that can end with hyphens.

If this property is set to 0 (zero), any number of consecutive lines can end with hyphens.

The following code example limits the number of consecutive lines that can end with hyphens to two. To use this example, run it from the ThisDocument class in a document-level project.

private void DocumentConsecutiveHyphensLimit()
{
    this.AutoHyphenation = true;
    this.ConsecutiveHyphensLimit = 2;
}
Return to top
Show: