Skip to content

Latest commit

 

History

History
60 lines (35 loc) · 1.19 KB

Word.Range.Font.md

File metadata and controls

60 lines (35 loc) · 1.19 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Range.Font property (Word)
vbawd10.chm157155333
vbawd10.chm157155333
Word.Range.Font
7582a7ed-0f16-e8f3-73f7-5d7b91193679
06/08/2017
medium

Range.Font property (Word)

Returns or sets a Font object that represents the character formatting of the specified object. Read/write Font.

Syntax

expression.Font

expression A variable that represents a Range object.

Remarks

To set this property, specify an expression that returns a Font object.

Example

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

ActiveDocument.Styles(wdStyleHeading1).Font.Bold = False

This example switches 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

See also

Range Object

[!includeSupport and feedback]