word count?

  • Thread starter Thread starter W. Frederick Zimmerman [OneNote MVP]
  • Start date Start date
W

W. Frederick Zimmerman [OneNote MVP]

is there a way to get Word to do an automatic word count every time it
closes a document and save that info to (ideally) an Excel file?
 
You could create a macro (search for help on macros) that would automate the word count process when you close a document, but as for that information being automatically inserted into an Excel file, I don't know. Perhaps the macro could do that as well, but I doubt it. Good hunting!
 
No problem about inserting data into an Excel file (or any other file) from
a macro:

Dim pXLApp as object
Dim pXLBook as object
set pXLApp = CreateObject("Excel.Application")
set pXLBook = pXLApp.Workbooks.Open("C:\...MyBook.xls")
pXLBook.Worksheets("WordLog").Range("C12") = ActiveDocument.Words.Count
:
etc




Erik Gregory said:
You could create a macro (search for help on macros) that would automate
the word count process when you close a document, but as for that
information being automatically inserted into an Excel file, I don't know.
Perhaps the macro could do that as well, but I doubt it. Good hunting!
 
thanks, pretty cool
Jezebel said:
No problem about inserting data into an Excel file (or any other file) from
a macro:

Dim pXLApp as object
Dim pXLBook as object
set pXLApp = CreateObject("Excel.Application")
set pXLBook = pXLApp.Workbooks.Open("C:\...MyBook.xls")
pXLBook.Worksheets("WordLog").Range("C12") = ActiveDocument.Words.Count
:
etc





the word count process when you close a document, but as for that
information being automatically inserted into an Excel file, I don't know.
Perhaps the macro could do that as well, but I doubt it. Good hunting!
 
Back
Top