
Tips.Net > WordTips Home > Macros > VBA Examples > Determining the Number of Fonts Available
Summary: Do you need to figure out how many fonts there are available to your document? Here's the VBA code to do it. (This tip works with Microsoft Word 97, Word 2000, Word 2002, and Word 2003.)
There may be times within your macros when you need to determine the number of fonts available for use. If you are writing your macros using VBA, you use the Count property of the FontNames object, as follows:
x = FontNames.Count
When finished, x will contain the number of fonts installed and available for use.
Tip #753 applies to Microsoft Word versions: 97 2000 2002 2003
Take Control! Master the real power behind Word! Successfully master the secrets of powerful formatting and create documents that stand out from the rest. Best of all, you can create documents that are easy to maintain and quick to change.
Check out Word 2007 Styles and Templates today!
Thousands of WordTips, available for immediate download. Have all the Microsoft Word info you need, right at your fingertips. (more information...)
Ask a Word Question
Make a Comment
Beauty Tips
Bugs and Pests Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Organizing Tips
Pet Tips
Word2007 Tips
WordTips