[python-win32] Translating MS-Word documents

2005-10-11 Thread Øyvind
Hello. I need to translate several Word-documents. I have a list with approximately 5000 words and its translation, and would like to read thru a Word-document, look for the words in the list and replace them. However, I need to keep the current formating of the Word-documents. (Using Word 2003 an

Re: [python-win32] Translating MS-Word documents

2005-10-12 Thread Øyvind
Hello, and thank you for the answers so far. The documents can be huge, as in 4-5000 pages, and there are upto 7*5000 words that needs to be replaced. (It is as you have pointed out a translation of languages, but for a very speicalised branch of patents. Therefore there are no translaters that kn

[python-win32] Unicode trouble

2005-12-01 Thread Øyvind
Hello. I am trying to use the search and replace-function in MS Word. (Office 2003, XP and Activestate Python 2.3). It works great until I use non-english letters. >>> from win32com.client import Dispatch >>> objWord = Dispatch("Word.Application") >>> objDoc = objWord.Documents.Open('c:/foo.doc'