Thanks, after some further digging I hit something...
The following seems to do the trick:

import win32gui
WINDOW_CLASS = 'XLMAIN'
WINDOW_TITLE = 'Microsoft Excel - MySpreadsheet.xls'
hwindow = win32gui.FindWindow(WINDOW_CLASS,WINDOW_TITLE)

Now the next question is: how do I use the window-handle returned? I
would like to work with a com object like the one returned by
win32com.client.Dispatch('ExcelApplication'). Any hint?

PS I could also use win32ui instead win32gui, in this case I get a
window object instead of an handle. But I still do not know how to
transform it into a nice pythoncom excel object.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to