Table of contents
TOC
折叠目录
展开目录

Application.PointsToMillimeters 方法 (发布服务器)Application.PointsToMillimeters Method (Publisher)

office 365 dev account|上次更新日期: 2018/3/13
|
3 参与人员

将度量单位从磅转换为毫米 (1 毫米 = 2.835 磅)。返回已转换为一个单一测量。Converts a measurement from points to millimeters (1 mm = 2.835 points). Returns the converted measurement as a Single.

语法Syntax

表达式PointsToMillimetersexpression. PointsToMillimeters( Value)

表示一个应用程序对象的 _expression_A 变量。_expression_A variable that represents an Application object.

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
Value必需Required一个Single要转换为毫米值的磅值。The point value to be converted to millimeters.

返回值Return Value

SingleSingle

注解Remarks

使用MillimetersToPoints方法将以毫米为单位的度量值转换为磅。Use the MillimetersToPoints method to convert measurements in millimeters to points.

示例Example

以下示例将用户以磅输入的度量值转换为厘米值。This example converts measurements in points entered by the user to measurements in centimeters.

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 _ 
 .PointsToMillimeters(Value:=Val(strInput)), _ 
 "0.00") &; " mm" 

 MsgBox strOutput 
Loop 

另请参阅See also

概念Concepts

Application 对象Application Object

© 2018 Microsoft