Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

word count

Status
Not open for further replies.

sqlnerd

Programmer
Jan 21, 2003
24
IN
Hi,

I know to programmatically search for a specific word in a MS Word document. Can anybody tell me how i can find the total count of a specific word.

Thanx in advance
 
One quick way is to do Edit Replace and enter the word in both the "Find what" and the "Replace with" fields and click the "Replace All" button.

This will display a message saying "Word has completed its search of the document and has made n replacements." - where n will be the number of occurences of the required word.

It's best to perform an undo after this action, so that any unwanted changes are disregarded.

Glenn.
 
Thanx for your reply Glenn... Even some of my friends suggested me the same idea as yours. Finally, I found the way out to do it through a macro.

--SQLNerd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top