Extract the text of a word document (doc2txt)

A very small example to convert Microsoft Word files to text files. A full featured batchconverter can be found at Homepage of doc2txt

import win32com.client
app = win32com.client.Dispatch('Word.Application')
doc = app.Documents.Open('c:\\files\\mydocument.doc')
print doc.Content.Text

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.