TextFrame.AutoFitText 属性 (Publisher)

设置或返回一个 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 支持和反馈,获取有关如何接收支持和提供反馈的指南。