fontVariant Property
Sets or returns a String that represents whether the text of the object displays normally or in small capital letters.
expression.fontVariant
expression Required. An expression that returns one of the objects in the Applies To list.
Remarks
String that specifies one of the following values:
normal |
Font is normal. Default. |
small-caps |
Font is in small capital letters. |
Example
This example inserts a new paragraph containing the current user's name into the active document, and then formats the font characteristics.
Sub FontFaceSource()
Dim objPara As FPHTMLParaElement
ActiveDocument.body.insertAdjacentHTML where:="beforeend", _
HTML:="<p id=""username"">" & Application.UserName & "</p>"
Set objPara = ActiveDocument.body.all.tags("p").Item("username")
With objPara.Style
.fontFamily = "Tahoma"
.FONTSIZE = "40pt"
.fontStyle = Italic
.fontVariant = "small-caps"
.fontWeight = "bold"
End With
End Sub