Font.Size Property (Word)

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


expression. Size

expression Required. A variable that represents a 'Font' object.


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 
 .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." 
 MsgBox mySel & " points" 
End If

See also

Font Object