Share via


Font.Size Property (Word)

Returns or sets the font size, in points. Read/write Single.

Syntax

expression .Size

expression Required. A variable that represents a Font object.

Example

This example inserts text and then sets the font size of the seventh word of the inserted text to 20 points.

Selection.Collapse Direction:=wdCollapseEnd 
With Selection.Range 
 .Font.Reset 
 .InsertBefore "This is a demonstration of font size." 
 .Words(7).Font.Size = 20 
End With

This example determines the font size of the selected text.

mySel = Selection.Font.Size 
If mySel = wdUndefined Then 
 MsgBox "there is a mix of font sizes in the selection." 
Else 
 MsgBox mySel & " points" 
End If

See Also

Concepts

Font Object

Font Object Members