共用方式為


Application.TwipsToPoints 方法 (Publisher)

將度量單位從 twip 轉換為 (20 twip = 1 點) 。 會傳回以 單一 轉換後的度量單位。

語法

運算式TwipsToPoints ()

expression 代表 Application 物件的變數。

參數

名稱 必要/選用 資料類型 描述
必要 Single 以指定須轉換成點數的 Twip 值。

傳回值

單一

註解

使用 PointsToTwips 方法可將度量單位從點轉換成 Twip。

範例

本範例會將使用者以 Twip 為單位所輸入的度量值轉換成以點為單位。

Dim strInput As String 
Dim strOutput As String 
 
Do While True 
 ' Get input from user. 
 strInput = InputBox( _ 
 Prompt:="Enter measurement in twips (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) & " twips = " _ 
 & Format(Application _ 
 .TwipsToPoints(Value:=Val(strInput)), _ 
 "0.00") & " points" 
 
 MsgBox strOutput 
Loop 

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應