WPS 基础接口 > 文字 API 参考 > Application > 方法 > Application.InchesToPoints 方法
将度量单位从英寸转换为磅(1 英寸 = 72 磅)。以 Single 类型返回转换结果。

语法

表达式.InchesToPoints(Inches)

表达式   一个代表 Application 对象的变量。可选。

参数

名称 必选/可选 数据类型 说明
Inches 必选 Single 要转换为磅值的英寸值。

示例

本示例将选定段落的段前间距设置为 0.25 英寸。

示例代码
Selection.ParagraphFormat.SpaceBefore = InchesToPoints(0.25)

本示例先将每个打开的文档的左右页边距设置为 0.65 英寸,再逐一打印各文档。

示例代码
for(let i=1; i<= Documents.Count;i++){
    Documents.Item(i).PageSetup.LeftMargin = InchesToPoints(0.65)
    Documents.Item(i).PageSetup.RightMargin = InchesToPoints(0.65)
    Documents.Item(i).PrintOut()
}


请参阅