Share via


FontName Property [Publisher 2003 VBA Language Reference]

FontName property as it applies to the DropCap and TextEffectFormat objects.

Sets or returns a String that represents the name of the font applied to a dropped capital letter or WordArt text effect. Read/write.

expression.FontName

expression Required. An expression that returns one of the above objects.

FontName property as it applies to the PhoneticGuide object.

Returns a String that represents the name of the font applied to phonetic information displayed above Japanese text. Read-only.

expression.FontName

expression Required. An expression that returns one of the above objects.

Example

This example applies the Script MT Bold font to the dropped capital letter in the specified text frame. This example assumes that the specified text frame is formatted with a dropped capital letter.

Sub BoldDropCap()
    With ActiveDocument.Pages(1).Shapes(1) _
            .TextFrame.TextRange.DropCap
        .FontBold = msoTrue
        .FontColor.RGB = RGB(Red:=150, Green:=50, Blue:=180)
        .FontItalic = msoTrue
        .FontName = "Script MT Bold"
    End With
End Sub

Applies to | DropCap Object | PhoneticGuide Object | TextEffectFormat Object