共用方式為


PowerPoint) (Shape.TextFrame 屬性

會傳回 TextFrame 物件,其中包含的對齊方式或錨定屬性指定的圖案或母片文字樣式。

語法

運算式TextFrame

表達 代表 Shape 物件的變數。

傳回值

TextFrame

註解

使用 TextFrame 物件的 TextRange 屬性可以傳回文字圖文框中。

使用 HasTextFrame 屬性來判斷您套用 TextFrame 屬性之前,圖案是否包含文字圖文框。

範例

在這個範例中,會將矩形新增至 myDocument、將文字新增至該矩形,然後設定文字圖文框的上邊界。

Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes _
        .AddShape(msoShapeRectangle, 180, 175, 350, 140).TextFrame
    .TextRange.Text = "Here is some test text"
    .MarginTop = 10
End With

另請參閱

Shape 物件

支援和意見反應

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