TextFrame.AutoFitText property (Publisher)
Sets or returns a PbTextAutoFitType constant that represents how Microsoft Publisher automatically adjusts the text font size and the TextFrame object size for best viewing. Read/write.
Syntax
expression.AutoFitText
expression A variable that represents a TextFrame object.
Return value
PbTextAutoFitType
Remarks
The AutoFitText property value can be one of the PbTextAutoFitType constants declared in the Microsoft Publisher type library.
Example
The following example tests to see if the text frame has text, and if so, the AutoFitText property is set to best fit.
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
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.