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

Last reviewed: July 30, 1997
Article 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.


KBCategory: kbother
KBSubcategory:
Additional query words: 1.x 1.0 1.1 1.1a winword2 word6
winword 2.0 2.0
Version : 1.x 2.x 6.0
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.