bottom
Great WordTips!
         
Your e-mail address is safe!
Close Note

Tips.Net > WordTips Home > Macros > WordBasic Examples > Determining How Many Styles are Available in WordBasic

Determining How Many Styles are Available in WordBasic

Summary: Quickly figure out how many styles are in your document by using this WordBasic code. (This tip works with Microsoft Word 6, and Word 95.)

You can determine the number of styles available in a document (when creating a WordBasic macro) by using the CountStyles() function. This is done using the following syntax:

x = CountStyles()

where x is the variable you can then use in other macro lines. Note that this function indicates how many have been defined, not how many of those are actually in use. This means that built-in styles are also counted.

Tip #802 applies to Microsoft Word versions: 6 | 95


Create and Merge! Using Word's mail merge tool you can quickly and easily combine data from a variety of data sources to create great individualized documents that incorporate your data in ways that you control. WordTips: Mail Merge Magic is an invaluable source for learning how to harness the full power of Word's mail merging capabilities.
 
Check out WordTips: Mail Merge Magic today!

Helpful Links

Ask a Word Question
Make a Comment

Tips.Net Home
Vital News Home

WordTips FAQ
WordTips Premium

Learn Access Now

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

Advertise on the
WordTips Site

 

Great Info!

Get tips like this every week in WordTips, a free productivity newsletter. Enter your e-mail address and click "Subscribe."
     
(Your e-mail address will never be shared with anyone, ever.)