Application.MillimetersToPoints 方法 (Publisher)Application.MillimetersToPoints method (Publisher)

會將度量單位從公釐轉換成(1 公釐 = 2.835 點)。Converts a measurement from millimeters to points (1 mm = 2.835 points). 會傳回以 單一 轉換後的度量單位。Returns the converted measurement as a Single.


運算式MillimetersToPointsexpression.MillimetersToPoints (Value)

expression 代表 Application 物件的變數。expression A variable that represents an Application object.


名稱Name 必要/選用Required/Optional 資料類型Data type 描述Description
ValueValue 必要Required SingleSingle 要轉換成點數的公釐值。The millimeter value to be converted to points.

傳回值Return value



使用 PointsToMillimeters 方法可將度量單位從點轉換成公釐。Use the PointsToMillimeters method to convert measurements in points to millimeters.


本範例將使用者以公釐為單位所輸入的度量值轉換成以點為單位。This example converts measurements in millimeters entered by the user to measurements in points.

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

支援和意見反應Support and feedback

有關於 Office VBA 或這份文件的問題或意見反應嗎?Have questions or feedback about Office VBA or this documentation? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.