Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.