>> The behaviour looks like the generated code would be wrong (there was
>> such an issue in the past), but at first inspection I cannot find what's
>> wrong.
>> Can you try out if any older comtypes version works better?
>
> My co-worker is using comtypes 0.4.1 however, I still get the same
> errors if I downgrade. We are currently geographically separated so I
> can not just walk over & check his PC.
>
> I got the generated code from the working installation but there is no
> difference between Find.__method__ of working & non working code. I
> thought that the problem was with my installation of Word but win32com
> has no problem using the Find object.
>
> Is there a way to debug the call to Content.Find? I could not debug it
> using WinPdb.
Not really. You would have to debug through COM marshalling code, probably,
and then through Word.
I could solve the issue for my machine by repairing the Office 2003
installation,
the following test script did not work before that and now runs fine.
Whatever this means ;-)
<code>
from comtypes.client import CreateObject
w = CreateObject("Word.Application")
try:
d = w.Documents.Add()
s = d.Content.Find
print s.Font, s.Application
finally:
w.Quit(False)
<code/>
Thomas
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
comtypes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/comtypes-users