August 17th, 2005, 11:15 AM
Python, Com and Ms Word
Firstly, i apologise as i didn't know where else to put this, i'm using python and COM to interact with MS Word, i'm trying to find the API that i can use to invoke the search and replace within word, so it replace every instance of ANDY with BOB.
Word = win32com.client.DispatchEx('Word.Application')
Word.visible = 0
Word.Application.ActivePrinter = printer
doc = Word.Documents.Open(wordfile, False, False, False)
# do replacing here
while Word.BackgroundPrintingStatus > 0:
Then its gonna print the doc and quit without saving.
Also, does anyone know where on MSDN where the documentation is for what API's word exposes thru COM.
August 18th, 2005, 02:23 AM