I have to perform a large number of replacements in some documents, and the thing is, I would like to be able to automate that task. Some of the documents contain common str
If this mailing list post is right, accessing the document's text is a simple as:
MSWord = win32com.client.Dispatch("Word.Application")
MSWord.Visible = 0
MSWord.Documents.Open(filename)
docText = MSWord.Documents[0].Content
Also see How to: Search for and Replace Text in Documents. The examples use VB and C#, but the basics should apply to Python too.