[python-win32] Casting to IRTDUpdateEvent object

John S js.20120405 at gmail.com
Sat Apr 7 05:19:19 CEST 2012

I'm trying to implement excelRTDserver.py (
I'm running Excel 2010 (32bit) so I change the EXCEL_TLB_MINOR value to 7.
The add-in is visible in the Excel add-ins list and if I enter
=RTD("Python.RTD.TimeServer","","seconds","5") into a cell, I get the
current time. But it never updates. If I change the "5" to another number,
I get an update but after the initial change it never updates.

I've isolated the problem to an exception raised when the callback object
returned by Excel is attempted to be cast into a IRTDUpdateEvent object.
This was discussed on this list previously (
http://mail.python.org/pipermail/python-win32/2011-March/011324.html) but
no solution. I tried the suggested solution of using CastTo, but when
EnsureDispatch is called within gencache.py it raises the exception at the
first line within the try statement (ti = disp._oleobj_.GetTypeInfo()).

So my question is how do I get the callback object to work? Any help would
be greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20120406/2d666189/attachment.html>

More information about the python-win32 mailing list