Font.Grow メソッド (Publisher)

選択されている文字列のフォント サイズを、現在のプリンターで使用可能な次の大きさまで拡大します。

構文

成長

Font オブジェクトを表す変数。

注釈

選択範囲に複数のフォント サイズが設定されている場合は、それぞれのフォント サイズが使用可能な次の大きさまで拡大します。

次の使用例は、新しいテキスト ボックスの 4 番目の単語のフォント サイズを大きくします。

Sub GrowFont() 
 Dim shpText As Shape 
 Dim intResponse As Integer 
 
 Set shpText = ActiveDocument.Pages(1).Shapes.AddTextbox( _ 
 Orientation:=pbTextOrientationHorizontal, Left:=100, _ 
 Top:=100, Width:=200, Height:=100) 
 
 With shpText.TextFrame.TextRange 
 .Text = "This is a test of the Grow method." 
 Do Until intResponse = vbNo 
 intResponse = MsgBox("Do you want to increase the " & _ 
 "size of the font?", vbYesNo) 
 If intResponse = vbYes Then 
 .Words(4).Font.Grow 
 End If 
 Loop 
 End With 
End Sub

次の使用例は、選択した文字列のフォント サイズを大きくします。

Sub IncreaseFontSizeOfSelectedText() 
 If Selection.Type = pbSelectionText Then 
 Selection.TextRange.Font.Grow 
 Else 
 MsgBox "You need to select some text." 
 End If 
End Sub

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。