共用方式為


Publisher) (TextFrame.AutoFitText 屬性

會設定或傳回 PbTextAutoFitType 常 數,代表 Microsoft Publisher 如何自動調整文字字型大小和 TextFrame 物件大小,以獲得最佳檢視。 讀取/寫入。

語法

運算式AutoFitText

表達 代表 TextFrame 物件的變數。

傳回值

PbTextAutoFitType

註解

AutoFitText屬性值可以是 Microsoft Publisher 類型程式庫中所宣告的PbTextAutoFitType常數之一。

範例

下列範例會測試看如果文字圖文框有文字,而如果是的話,會將 AutoFitText 屬性設為最適大小。

Sub TextFit() 
 
 Dim tfFrame As TextFrame 
 
 tfFrame = Application.ActiveDocument.MasterPages.Item(1).Shapes(1).TextFrame 
 With tfFrame 
 If .HasText = msoTrue Then .AutoFitText = pbTextAutoFitBestFit 
 End With 
 
End Sub

支援和意見反應

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