title: Retrieving outlook Contacts via python win32com
body: <p>I am Trying to get Contacts out of <code>Outlook</code> using <code>Python</code>.
  The code is :</p>
  <pre><code>import win32com.client
  import pywintypes
  
  o = win32com.client.Dispatch(&quot;Outlook.Application&quot;)
  ns = o.GetNamespace(&quot;MAPI&quot;)
  profile = ns.Folders.Item(&quot;Outlook&quot;)
  contacts = profile.Folders.Item(&quot;Contacts&quot;)
  </code></pre>
  <p>but its giving error like this:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;my_pro.py&quot;, line 7, in &lt;module&gt;
      profile = ns.Folders.Item(&quot;Outlook&quot;)
    File &quot;C:\DOCUME~1\Manoj\LOCALS~1\Temp\gen_py\2.7\00062FFF-0000-0000-C000-00000
  0000046x0x9x3\_Folders.py&quot;, line 70, in Item
      ret = self._oleobj_.InvokeTypes(81, LCID, 1, (9, 0), ((12, 1),),Index
  pywintypes.com_error: (-2147352567, 'Exception occurred.', (4096, u'Microsoft Of
  fice Outlook', u'The operation failed. An object could not be found.', None, 0,
  -2147221233), None)
  </code></pre>
  <p>I don't understand why it's throwing the error, as I do have a profile named <code>Outlook</code><br></p>