I'd take the easy way out and use winPython's COM objects to open the
doc in word, and save it as .txt
and then -
f=file("doc.txt",'r')
j=f.read()
j=j.split(" ")
print len(j)
On Thu, 20 Jan 2005 13:59:16 -0500, Roger Merchberger
<[EMAIL PROTECTED]> wrote:
> Rumor has it that Bill Mill may have
Rumor has it that Bill Mill may have mentioned these words:
[snip]
Once you're connected to a word document, you'll have to figure out
what the command to count the words in the document is, but that's
just a matter of recording a macro in word where you count the words,
then repeating it in python
Sure,
What you need are the win32 extensions for python
(http://starship.python.net/crew/mhammond/win32/Downloads.html), which
contain win32com. Through com, you can access almost anything in
windows. Check out
http://aspn.activestate.com/ASPN/docs/ActivePython/2.2/PyWin32/html/com/win32com/HTML/Q
Title: counting no of words
hi all,
Is it possible to write a program in python to calculate the number of words in a MS-Word document Page
Regards
gopi
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor