Excel) (TextFrame 物件

代表 Shape 物件中的文字圖文框。 包含文字圖文框中的文字,以及控制文字圖文框對齊和錨定的屬性和方法。

註解

使用Shape物件的TextFrame屬性可傳回TextFrame物件。

範例

下列範例會在 myDocument 中新增矩形,並且在矩形中新增文字,然後設定文字圖文框的邊界。

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

方法

屬性

另請參閱

支援和意見反應

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