![]() |
#1
|
|||
|
|||
![]()
I know that when you're on an individual document and press Ctrl+F, you can specify a word to see how many times it occurs. But I have an odd situation where I want to see how many times a word occurs in entire folder full of documents (some with their own sub-folders) so I don't have to Ctrl+F each one and add to the total number; document by document.
Is there a way to do this, or do I pretty much have to do it the way I mentioned? This isn't the word, but here's a similar example to mine: Say the word was "OKAY!" Case-sensitive and has to have the exclamation mark at the end. Thanks for any help with my odd question! ![]() |
#2
|
||||
|
||||
![]()
A simple way to find out the number of occurrences of a word is to replace it with itself. When you click the Replace All button, Word reports the number of replacements.
For a single document, you can use the macro in the article How to find out, using VBA, how many replacements Word made during a Find & Replace All. Since you want to process all the documents in a folder, you would have to combine this with code that iterates through multiple documents. This is not a trivial task, of course.
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional Last edited by Stefan Blom; 09-25-2021 at 05:01 AM. |
#3
|
|||
|
|||
![]()
The following may help with handling multiple documents:
|
#4
|
||||
|
||||
![]()
Useful references!
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional |
![]() |
Tags |
count, counter, counting |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Stefan_Deckers | Excel | 3 | 09-19-2020 02:36 PM |
![]() |
blackjack | Excel | 12 | 09-03-2014 10:41 AM |
![]() |
Carol Salcido | Excel | 17 | 02-26-2014 03:57 PM |
![]() |
slimhan | Excel | 1 | 11-17-2012 08:17 PM |
![]() |
lucnijs | Excel | 6 | 03-26-2012 09:29 AM |