View Single Post
 
Old 09-25-2021, 01:04 AM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Windows 10 Office 2019
Moderator
 
Join Date: Aug 2011
Posts: 3,907
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

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.
Attached Images
File Type: png ReplaceWordWithItself.PNG (29.2 KB, 12 views)
__________________
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.
Reply With Quote