Font.Shrink 方法 (Publisher)
将字号缩小为下一个可用的字号。 如果选定内容或范围中包括多个字号,将每一个字号缩小为下一个可用设置。
语法
表达式。收缩
表达 一个代表 Font 对象的变量。
备注
对已通过 Microsoft Publisher (0.5 点) 允许的最小大小的文本应用 收缩 的方法不起作用。
示例
本示例在新文档中插入一行越来越小的 Z。
Dim shpText As Shape
Dim trTemp As TextRange
Dim intCount As Integer
Set shpText = ActiveDocument.Pages(1).Shapes _
.AddTextbox(Orientation:=pbTextOrientationHorizontal, _
Left:=100, Top:=100, Width:=300, Height:=50)
Set trTemp = shpText.TextFrame.TextRange
With trTemp
.Font.Size = 45
.InsertAfter NewText:="ZZZZZZZZZZ"
For intCount = 2 To 10
.Characters(Start:=intCount, _
Length:=11 - intCount).Font.Shrink
Next intCount
End With
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈