Share via


Font Property [Publisher 2003 VBA Language Reference]

Sets or returns a Font object that represents character formatting attributes applied to the specified object. Read/write.

expression.Font

expression Required. An expression that returns one of the objects in the Applies To list.

Example

This example selects text and formats the font as bold.

Sub test2()
    With Selection.TextRange
        .Start = 50
        .End = 150
        .Font.Bold = msoTrue
    End With
End Sub

Applies to | TextRange Object | TextStyle Object