Propiedad Font.Subscript (Word)

True si la fuente tiene el formato subíndice. Long de lectura y escritura.

Sintaxis

expresión. Subíndice

expresión Expresión que devuelve un objeto Font .

Observaciones

Devuelve True, False o wdUndefined (una mezcla de True y False). Puede establecerse en True, False o wdToggle.

Si la propiedad Subscript en True, se establece la propiedad Superscript en False y viceversa.

Ejemplo

En este ejemplo, se inserta texto al principio del documento activo y se aplica el formato de subíndice al noveno carácter del texto.

Set myRange = ActiveDocument.Range(Start:=0, End:=0) 
myRange.InsertAfter "Water = H20" 
myRange.Characters(10).Font.Subscript = True

En este ejemplo, se busca subíndices en el texto seleccionado.

If Selection.Type = wdSelectionNormal Then 
 mySel = Selection.Font.Subscript 
 If mySel = wdUndefined Or mySel = True Then 
 MsgBox "Subscript text exists in the selection." 
 Else 
 MsgBox "No subscript text in the selection." 
 End If 
Else 
 MsgBox "You need to select some text." 
End If

Vea también

Objeto Font

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.