TextRange.BoundTop 屬性 (Publisher)

傳回 [ Single ],指出指定文字範圍中從最頂端頁面的頂端邊緣到週框方塊頂端邊緣的距離 ( 以點為單位)。 唯讀。

語法

運算式。BoundTop

運算式 代表 TextRange 物件的變數。

傳回值

單一

範例

下列範例顯示使用中出版物第一頁第一個圖案中,環繞文字的文字方塊位置、寬度及高度。

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 支援與意見反應。