Global.InchesToPoints 方法 (Word)

将度量单位从英寸转换为磅 (1 英寸 = 72 磅)。 返回已转换为一个 单一 测量。

语法

expressionInchesToPoints( _Inches_ )

表达 一个代表“全局”对象的变量。 可选。

参数

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

返回值

单精度

示例

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

Selection.ParagraphFormat.SpaceBefore = InchesToPoints(0.25)

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

Dim docLoop As Document 
 
For Each docLoop in Documents 
 With docLoop 
 .PageSetup.LeftMargin = InchesToPoints(0.65) 
 .PageSetup.RightMargin = InchesToPoints(0.65) 
 .PrintOut 
 End With 
Next docLoop

另请参阅

Global 对象

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。