Syntax
Font Name$ [, Size]
Font$()
Font$(Count)
Remarks
The Font statement applies the specified font to the selection.
Argument | Explanation | |
Name$ | The name of the font to apply. | |
Size | The size of the font, in points. You can use this argument instead of following a Font instruction with a FontSize instruction. |
The Font$() function returns the name of the font applied to the selection. If the selection contains more than one font, an empty string ("") is returned. If Count is specified, Font$() returns the name of the font at position Count in the current font list, in the range 1 to CountFonts().
Examples
This example selects the paragraph containing the insertion point (using the predefined bookmark " \ Para") and then applies 8-point Courier font:
EditGoTo "\Para" Font "Courier", 8
The following example displays a message box if the paragraph containing the insertion point has more than one font:
EditGoTo "\Para" If Font$() = "" Then MsgBox "Paragraph contains more than one font." End If
See Also
CountFonts(), FontSize, FormatFont