Share via


Excel) (TextFrame.MarginRight 屬性

會傳回或設定 (的距離,以 文字 圖文框右邊緣與包含文字之圖形的右邊緣之間的點) 為單位。 讀寫 Single

語法

運算式MarginRight

表達 代表 TextFrame 物件的變數。

範例

本範例會將矩形新增至 myDocument、將文字新增至矩形,然後設定文字圖文框的邊界。

Set myDocument = Worksheets(1) 
With myDocument.Shapes.AddShape(msoShapeRectangle, _ 
 0, 0, 250, 140).TextFrame 
 .Characters.Text = "Here is some test text" 
 .MarginBottom = 0 
 .MarginLeft = 100 
 .MarginRight = 0 
 .MarginTop = 20 
End With

支援和意見反應

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