I need to process a bunch of word files using win32ole. word = WIN32OLE.new('word.application') starts a new word application instance each time it executes. Is there a way to get a hold of the currently running word app, if any? Thanks.
on 2006-03-11 21:44
on 2006-03-11 21:50
Use the connect method in place of the new method: word = WIN32OLE.connect('word.application')
on 2006-03-14 14:21
How would you choose between a number of different running instances of an application?
on 2006-03-14 15:45
You could use the WIN32OLE.connect method with the path and filename of the open document in place of the ProgID: xlWorkbook = WIN32OLE.connect('c:\SomeFolder\SomeFile.xls') I have only tested this with Excel, but it should also work to obtain a Word document object. Mully