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