i am trying to automate outlook using python. my code seems to work fine with outlook 2007, however with outlook 2003 it's giving the following error.
Traceback (most recent call last): File "<stdin>",line 1, in <module> File "C:\Python27\lib\site-packages\comtypes\client\_events.py", line 218 in ShowEvents return comtypes.client.GetEvents(source, sink=EventDumper(), interface=interface) File "C:\Python27\lib\site-packages\comtypes\client\_events.py", line 193,in GetEvents interface = FindOutgoingInterface(source) File "C:\Python27\lib\site-packages\comtypes\client\_events.py", line 73 in FindOutgoingInterface raise TypeError("cannot determine source interface") TypeError: cannot determine source interface This is the code i am using from comtypes.client import GetEvents class EventSink(object): def ApplicationEvents_11_NewMailEx(self, this, entryid): print "mail arrived" print entryid def ApplicationEvents_10_NewMailEx(self, this, entryid): print "mail arrived" print entryid from comtypes.client import CreateObject xl = CreateObject("Outlook.Application") from comtypes.client import PumpEvents sink = EventSink() connection = GetEvents(xl, sink) PumpEvents(3000) can anyone plz point out as to what could be possibly wrong. Thanks in advance
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32