Application.PointsToMillimeters 方法 (Publisher)
将度量值从 磅 转换为毫米, (1 mm = 2.835 磅) 。 转换后的度量单位以 Single 类型返回。
语法
表达式。PointsToMillimeters (Value)
expression:表示 Application 对象的变量。
参数
名称 | 必需/可选 | 数据类型 | 说明 |
---|---|---|---|
值 | 必需 | Single | 要转换为毫米值的磅值。 |
返回值
单精度
备注
使用 MillimetersToPoints 方法可将度量单位从毫米转换为磅。
示例
本示例将用户输入的度量值(以磅为单位)转换为以毫米为单位的度量值。
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
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈