共用方式為


TextFrame2.MarginLeft 屬性 (辦公室)

會傳回或設定文字圖文框的左邊緣以及包含該文字之圖案的矩形左邊緣之間的距離 (以點為單位)。 讀取/寫入。

語法

表情MarginLeft

一個回傳 TextFrame2 物件的表達式。

範例

下列程式碼會將矩形新增至投影片、並將文字新增至矩形,然後設定文字圖文框的邊界。

Set pptSlide = ActivePresentation.Slides(1) 
With pptSlide.Shapes.AddShape(msoShapeRectangle, 0, 0, 250, 140).TextFrame2 
 .TextRange.Text = "Here is some sample text" 
 .MarginBottom = 10 
 .MarginLeft = 10 
 .MarginRight = 10 
 .MarginTop = 10 
End With

另請參閱

支援和意見反應

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