Word) (Application.InchesToPoints 方法

會將度量單位從英吋轉換成點 (1 英吋 = 72 點)。 會傳回以 單一 轉換後的度量單位。

語法

expressionInchesToPoints( _Inches_ )

expression 代表 Application 物件的變數。 選用。

參數

名稱 必要/選用 資料類型 描述
Inches 必要 Single 要轉換成點數的英吋數值。

範例

這個範例會將選取的段落之前的間距設定為 0.25 英吋。

Selection.ParagraphFormat.SpaceBefore = InchesToPoints(0.25)

這個範例會在將左右邊界都設定為 0.65 英吋之後,列印每一份開啟的文件。

Dim docLoop As Document 
 
For Each docLoop in Documents 
 With docLoop 
 .PageSetup.LeftMargin = InchesToPoints(0.65) 
 .PageSetup.RightMargin = InchesToPoints(0.65) 
 .PrintOut 
 End With 
Next docLoop

另請參閱

Application 物件

支援和意見反應

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