DocumentBase.ConsecutiveHyphensLimit 屬性

取得或設定可以使用短破折號結尾的連續行數上限。

命名空間:  Microsoft.Office.Tools.Word
組件:  Microsoft.Office.Tools.Word.v4.0.Utilities (在 Microsoft.Office.Tools.Word.v4.0.Utilities.dll 中)

語法

'宣告
Public Property ConsecutiveHyphensLimit As Integer
    Get
    Set
public int ConsecutiveHyphensLimit { get; set; }

屬性值

型別:System.Int32
可以使用短破折號結尾的連續行數上限。

備註

如果此屬性設定為 0 (零),可以使用短破折號結尾的連續行數就沒限制。

範例

下列程式碼範例會將可以使用短破折號結尾的連續行數限制為二行。 若要使用這個範例,請在文件層級專案中的 ThisDocument 類別執行。

Private Sub DocumentConsecutiveHyphensLimit()
    Me.AutoHyphenation = True
    Me.ConsecutiveHyphensLimit = 2
End Sub
private void DocumentConsecutiveHyphensLimit()
{
    this.AutoHyphenation = true;
    this.ConsecutiveHyphensLimit = 2;
}

.NET Framework 安全性

請參閱

參考

DocumentBase 類別

Microsoft.Office.Tools.Word 命名空間