Application.PointsToEmus 方法 (Publisher)

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

语法

表达式PointsToEmus ()

expression:表示 Application 对象的变量。

参数

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

返回值

单精度

备注

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

示例

本示例将用户输入的度量值(以磅为单位)转换为 emus 中的度量值。

Dim strInput As String 
Dim strOutput As String 
 
Do While True 
 ' Get input from user. 
 strInput = InputBox( _ 
 Prompt:="Enter measurement in points (0 to cancel): ", _ 
 Default:="0") 
 
 ' Exit the loop if user enters zero. 
 If Val(strInput) = 0 Then Exit Do 
 
 ' Evaluate and display result. 
 strOutput = Trim(strInput) & " points = " _ 
 & Format(Application _ 
 .PointsToEmus(Value:=Val(strInput)), _ 
 "0.00") & " emus" 
 
 MsgBox strOutput 
Loop 

支持和反馈

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