S
SF
How can I count the number of times a particular word appears in my
document?
document?
How can I count the number of times a particular word appears in my
document?
See http://www.word.mvps.org/FAQs/MacrosVBA/NoTimesTextInDoc.htm.How can I count the number of times a particular word appears in my
document?
Jean-Guy Marcil said:SF was telling us:
SF nous racontait que :
Quick and dirty:
Find/Replace:
Find what: the
(Make sure to check the "Whole word" checkbox)
Replace with: Anything, it does not matter.
Hit "Replace All"
Then a dialog shows up telling you how many occurrences where
replaced (i.e How many "Find what" expressions)
Click OK
When back in your document, do CTRL-Z immediately to undo the
Find/Replace
--I know (intellectually) that doing a find/replace and then UN-doing it
results in essentially no change, but my heart worries because the fact is
that something WAS changed, and then put back. However irrational it may
seem, I don't like doing and undoing dozens of changes in a very, very
important document. It's just unnerving. Sorry.
I'll go with a regular count, thank you. (Even if it does take longer. I'll
sacrifice a few seconds in order to keep peace of mind.)
Thank you all.
If you use ^& as the replace string, Word will simply put back the
word it found, so undo becomes unnecessary.
Can you tell me where to find that? I can find a 'replace all' but no
'find all'. Thanks.
Suzan
Jean-Guy Marcil said:Suzan was telling us:
Suzan nous racontait que :
From the "Find" dialog, you have to first check the "Highlight all items
found in:", then choose "Main document". Once you do that you will see that
the "Find" button becomes "Find All." Click on "Find All," then Word will
report how many items were found right inside the "Find" dialog box, above
the three buttons.
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org