Font Property

Applies To

Find object, ListLevel object, Range object, Replacement object, Selection object, Style object.

Description

Returns or sets a Font object that represents the character formatting of the specified object. To set this property, specify an expression that returns a Font object. Read/write Font.

See Also

Animation property, Bold property, Emboss property, Engrave property, Font object, FontNames property, Hidden property, Italic property, Kerning property, Name property, Shadow property, Size property, StrikeThrough property, Subscript property, Superscript property, Underline property.

Example

This example removes bold formatting from the Heading 1 style in the active document.

ActiveDocument.Styles(wdStyleHeading1).Font.Bold = False
This example toggles the font of the second paragraph in the active document between Arial and Times New Roman.

Set myRange = ActiveDocument.Paragraphs(2).Range
If myRange.Font.Name = "Times New Roman" Then
    myRange.Font.Name = "Arial"
Else
    myRange.Font.Name = "Times New Roman"
End If
This example displays the font of the selected text.

MsgBox Selection.Font.Name
This example applies the character formatting of the selected text to the first paragraph in the active document.

Set myFont = Selection.Font.Duplicate
ActiveDocument.Paragraphs(1).Range.Font = myFont
This example finds the next range of text that's formatted with the Times New Roman font.

With Selection.Find
    .ClearFormatting
    .Font.Name = "Times New Roman"
    .Execute FindText:="", ReplaceWith:="", Format:=True, _
        Forward:=True
End With