Compartir a través de


Método Font.Grow (Publisher)

Aumenta el tamaño de la fuente con el siguiente tamaño disponible.

Sintaxis

expresión. Crecer

expresión Variable que representa un objeto Font .

Observaciones

Si la selección o el intervalo contiene varios tamaños de fuente, cada uno de ellos se aumenta al siguiente valor disponible.

Ejemplo

En este ejemplo se aumenta el tamaño de fuente de la cuarta palabra de un cuadro de texto nuevo.

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

En este ejemplo se aumenta el tamaño de fuente del texto seleccionado.

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

Soporte técnico y comentarios

¿Tiene preguntas o comentarios sobre VBA para Office o esta documentación? Vea Soporte técnico y comentarios sobre VBA para Office para obtener ayuda sobre las formas en las que puede recibir soporte técnico y enviar comentarios.