Welcome toWord.Tips.Net
Ask a Word Question
Make a Comment
Learn Access Now
Free Printable Forms
Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Legal Tips
Money Tips
Organizing Tips
Pest Tips
Pet Tips
Wedding Tips
Word2007 Tips
WordTips
Setting Fraction Bar Overhang Spacing in the Equation Editor
Printing On Both Sides of the Paper
Turning Off AutoComplete for Dates
Understanding Auto Line Spacing
Adding Comments to Your Document
Conditional Calculations in Word
You probably already knew that Word provides a way to determine the number of words in a selection or in your entire document. Word has its own internal algorithms to figure out the proper count. This is great, if you need to know actual word counts.
Before the days of actual word counts, however, typists figured out the number of average words in a document. This was done by figuring out the number of characters typed, and then dividing that figure by five. For some purposes you may still need to figure word counts using this old-fashioned approach. This can be done with a simple WordBasic macro, as follows:
Sub MAIN
Title$ = "WordCount"
On Error Goto HugeString
InSelection = SelType()
If InSelection = 2 Or InSelection = 6 Then
WordCount = Int((Len(Selection$()) / 5) + 0.5)
WordCount$ = Mid$(Str$(WordCount), 2) + " word"
If WordCount > 1 Then WordCount$ = WordCount$ + "s"
MsgBox WordCount$, Title$
Else
Beep
MsgBox "No text selected", Title$, 16
End If
Goto Done
HugeString:
MsgBox "Selection too large", Title$, 48
Done:
End Sub
Tip #756 applies to Microsoft Word versions: 6 95
Tremendous Table Tips! We often take tables for granted, but Word includes some very powerful ways you can present your tabular data. Discover how to make your tables better, easier to understand, and more effective.