Application.CmsToPoints メソッド (Publisher)

測定をセンチメートルから ポイント (1 cm = 28.35 ポイント) に変換します。 変換した単位を単精度浮動小数点型 (Single) の値として取得します。

構文

センチメートルToPoints ()

expressionApplication オブジェクトを 表す変数。

パラメーター

名前 必須 / オプション データ型 説明
必須 単精度浮動小数点型 (Single) ポイントに変換するセンチメートル値を指定します。

戻り値

1 行

注釈

ポイント単位からセンチメートル単位に変換するには、 PointsToCentimeters メソッドを使用します。

次の使用例は、ユーザーが入力したセンチメートル単位の値を、ポイント単位に変更します。

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

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。