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
app.Quit()

Leave a Reply

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