Application.LinesToPoints 方法 (Publisher)

将度量值从线条转换为 (1 行 = 12 磅) 。 转换后的度量单位以 Single 类型返回。

语法

表达式LinesToPoints (Value)

expression:表示 Application 对象的变量。

参数

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

返回值

单精度

备注

此方法假定以 12 磅线为单位进行度量;出版物中任何文本的实际大小对转换因子没有影响。

使用 PointsToLines 方法可将度量单位从磅转换为行。

示例

本示例将度量从行转换为磅,示范了当前选定内容中的字号不影响转换因子。 为了使本示例生效,必须在当前出版物中选中某些文字。

Dim strOutput As String 
 
' Set text size to 10 points. 
Selection.TextRange.Font.Size = 10 
 
' Display result for one line of text. 
strOutput = "1 line = " _ 
 & Format(Application _ 
 .LinesToPoints(Value:=1), _ 
 "0.00") & " points"

支持和反馈

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