Partager via


Selection.Font Property (Word)

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

Syntax

expression .Font

expression A variable that represents a Selection object.

Remarks

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

Example

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

See Also

Concepts

Selection Object Members

Selection Object