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