I am getting Operational Error : when i try get my contacts .<br><br>My code :<br>import win32com.client<br>oOutlook = win32com.client.gencache.EnsureDispatch("Outlook.Application")<br>onMAPI = oOutlook.GetNamespace
("MAPI")<br>ofContacts = onMAPI.GetDefaultFolder(10) # 10=outlook contacts folder<br>redemption = oOutlook.CreateObject('Redemption.SafeContactItem')<br>for i in range(len(ofContacts.Items)):<br> redemption.Item
= ofContacts.Items.Item(i+1)<br> print redemption.Subject<br><br>can any one tell me , what i am doing error or please tell me to solve this problem.<br><br><br>My Error:<br><br> File "m1.py", line 5, in <module>
<br> redemption = oOutlook.CreateObject('Redemption.SafeContactItem')<br> File "C:\Python25\lib\site-packages\win32com\gen_py\00062FFF-0000-0000-C000-00<br>0000000046x0x9x3\_Application.py", line 82, in CreateObject
<br> ret = self._oleobj_.InvokeTypes(277, LCID, 1, (9, 0), ((8, 1),),ObjectName<br>pywintypes.com_error: (-2147352567, 'Exception occurred.', (4096, 'Microsoft Off<br>ice Outlook', 'The operation failed.', None, 0, -2147221005), None)
<br><br><br>Antony<br>