VBA word count, closed document(s)

D

Dennis

Hello,

I have a folder with about 20 word documents and I would
like to find out how many words are in all of the documents
combined w/out referencing to each file explicty i.e 1.doc
2.doc rather something to the extent of *.doc .
I hope you know what it is that I'm trying to say
and output this to anywhere msgbox or a text file or write
it to the active document.

Thank You,
Den
..
 
J

Jay Freedman

Hi, Dennis,

Go to http://www.mvps.org/word/FAQs/MacrosVBA/DSOFile.htm and download both
the DSOfile.dll and the ListProps.dot files. Install and register the DLL
according to the directions. Then look at the code in the userform in
ListProps.dot, which shows how to make calls to the DLL for all the files in
a folder. Instead of making a new document containing a table of the
properties of the files, you want to retrieve the value of
oDocProp.WordCount from each file and add it to a cumulative total. After
all the files have been processed, you can display the total.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top