Hi John, > (1) xl = win32com.client.Dispatch("Excel.Application") > (2) print repr(xl) > (3) xlwb = xl.Workbooks.Open(filename) > > Before, line 2 would print this: > <win32com.gen_py.Microsoft Excel 10.0 Object > Library._Application instance at > 0x39073872> > and line 3 would work OK. > > Now, line 2 prints this: > <COMObject Excel.Application>
That is strange - the script is not finding the makepy generated file. This could be due to the gen_py directory being removed - by default you should find it in lib\site-packages\win32com\gen_py Using win32com.client.gencache.EnsureDispatch() in place of Dispatch should force that generation - but I'm afraid I have no idea why it suddenly became necessary. Mark _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32