Font$(0) Returns Default Font Name in Word for Windows

ID: Q72800


The information in this article applies to:
  • Microsoft Word for Windows, versions 1.0, 1.1, 1.1a, 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c


SUMMARY

In the WordBasic language used in Microsoft Word for Windows and Microsoft Word for OS/2, Font$() returns the font name of the current selection. If a COUNT argument is specified, Font$() returns the name of the font COUNT. COUNT must be in the range of 1 to CountFonts().

However, if the COUNT argument is 0 (zero), the name of the default font for the document is returned.


MORE INFORMATION

For example, CountFonts() might return a value of 4. This means that there are four fonts in the Format Character Font list, corresponding to the number of fonts available with the selected printer. Font$(1) would correspond to the first font in the list, Font$(2) the second, and so on. Font$(0) will return the name of the current default font.

Reference(s):

"Microsoft Word for Windows Technical Reference," version 1.0, pages 37 and 54.

"Microsoft Word for Windows and OS/2 Technical Reference," version 1.0 pages 145 and 179.

Additional query words: 1.x 1.0 1.1 winword2 word6 winword 2.0

Keywords :
Version : WINDOWS:1.0,1.1,1.1a,2.0,2.0a,2.0a-CD,2.0b,2.0c,6.0,6.0a,6.0c
Platform : WINDOWS
Issue type :


Last Reviewed: December 23, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.