WPS 基础接口 > 文字 API 参考 > Document > 属性 > Document.HyphenationZone 属性
返回或设置断字区的宽度(以磅为单位)。Long 类型,可读写。

语法

表达式.HyphenationZone

表达式   一个代表 Document 对象的变量。

说明

断字区是 WPS 在一行最后一个单词与右边距间的保留的最大距离。

示例

本示例为 MyReport.doc 启用自动断字功能。并将断字区的宽度设置为 36 磅(0.5 英寸)。

示例代码
Documents.Item("MyReport.doc").AutoHyphenation = true
Documents.Item("MyReport.doc").HyphenationZone = 36

本示例将断字区的宽度设置为 0.25 英寸(18 磅),并启用活动文档的手动断字功能。

示例代码
ActiveDocument.HyphenationZone = InchesToPoints(0.25)
ActiveDocument.ManualHyphenation()


请参阅