Expand Minimize

DocumentBase.ConsecutiveHyphensLimit Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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;
}

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft