FontName Property

Microsoft Publisher Visual Basic

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.

ShowFontName 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