Compartilhar via


Selection.Font Property

Word Developer Reference

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.

Visual Basic for Applications
  MsgBox Selection.Font.Name

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

Visual Basic for Applications
  Set myFont = Selection.Font.Duplicate
ActiveDocument.Paragraphs(1).Range.Font = myFont

See Also