Excel) (TextFrame2 物件
代表Shape、ShapeRange或ChartFormat物件中的文字圖文框。
註解
此物件包含文字圖文框以及屬性和方法,以控制的對齊方式或錨定文字圖文框中的文字。 使用 TextFrame2 屬性可傳回 TextFrame2 物件。
範例
下列範例會在 myDocument 中新增矩形,並且在矩形中新增文字,然後設定文字圖文框的邊界。
Set myDocument = Worksheets(1)
With myDocument.Shapes.AddShape(msoShapeRectangle, _
0, 0, 250, 140).TextFrame2
.TextRange.Text = "Here is some test text"
.MarginBottom = 10
.MarginLeft = 10
.MarginRight = 10
.MarginTop = 10
End With
方法
屬性
- 應用程式
- AutoSize
- 欄
- Creator
- HasText
- HorizontalAnchor
- MarginBottom
- MarginLeft
- MarginRight
- MarginTop
- NoTextRotation
- Orientation
- Parent
- PathFormat
- Ruler
- TextRange
- ThreeD
- VerticalAnchor
- WarpFormat
- WordArtformat
- WordWrap
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應