<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
>> > Hi list,
>> >
>> > I upgraded to Python 2.5 for evaluation and testing.
>> After installing the pywin32-210.win32-py2.5.exe, I found that the
>> > constants module doesn't work. For example, this code fails:
>> >
>> > from win32com.client import Dispatch, constants
>> >
>> > print constants.xlDown
>> >
>> > I re-execute makepy.py and selected "Microsoft Office 10.0 Object
>> > Library (2.2)" but the problem persists.
>> >
>> > What should I do?
>> >
>> > Thanks,
>> >
>> > --
>> > John Henry
>>
>> xlDown appears to be in the Excel object library rather than
>> the Office object library.
>>
>> hth
>> Roger
>>
>>
>>
>
> Thanks for the reply.
>
> That's the one I've been using before the migration to 2.5. I went back and
> tried both Microsoft Excel 10.0 (1.4) and 5.0
> (1.0) Object Library and the failures are the same.
>
Try clearing out your gen_py folder and starting from scratch.
The below works for me with 2.5.
>>> import win32com.client
>>> xl=win32com.client.gencache.EnsureDispatch('Excel.Application',0)
>>> print win32com.client.constants.xlDown
-4121
>>>
Roger
_______________________________________________
Python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32