TextRange.BoundWidth プロパティ (Publisher)

指定したテキスト範囲の境界ボックスの幅をポイント単位で示す Single を返します。 読み取り専用です。

構文

BoundWidth

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

戻り値

1 行

次の使用例は、作業中の文書で 1 番目のページの最初の図形のテキストを囲む境界ボックスの位置、幅、高さを表示します。

Dim rngText As TextRange 
Dim strMessage As String 
 
Set rngText = ActiveDocument.Pages(1) _ 
 .Shapes(1).TextFrame.TextRange 
 
With rngText 
 strMessage = "Text frame information" & vbCrLf _ 
 & " Distance from left edge of page: " _ 
 & .BoundLeft & " points" & vbCrLf _ 
 & " Distance from top edge of page: " _ 
 & .BoundTop & " points" & vbCrLf _ 
 & " Width: " & .BoundWidth & " points" & vbCrLf _ 
 & " Height: " & .BoundHeight & " points" 
End With 
 
MsgBox strMessage

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

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