title: Using win32com and/or active_directory, how can I access an email folder by name?
body: <p>In python w/ Outlook 2007, using win32com and/or active_directory, how can I get a reference to a sub-folder so that I may move a MailItem to this sub-folder? </p>
  
  <p>I have an inbox structure like:
  <PRE>
      Inbox
        |
        +-- test
        |
        `-- todo
  </PRE></p>
  
  <p>I can access the inbox folder like:</p>
  
  <pre><code>import win32com.client
  import active_directory
  session = win32com.client.gencache.EnsureDispatch("MAPI.session")
  win32com.client.gencache.EnsureDispatch("Outlook.Application")
  outlook = win32com.client.Dispatch("Outlook.Application")
  mapi = outlook.GetNamespace('MAPI')
  inbox =  mapi.GetDefaultFolder(win32com.client.constants.olFolderInbox)
  print '\n'.join(dir(inbox))
  </code></pre>
  
  <p>But when I try to get subdirectory <code>test</code> per <a href="http://msdn.microsoft.com/en-us/library/bb175261.aspx" rel="nofollow noreferrer">Microsoft's example</a> the <code>inbox</code> object doesn't have the <code>Folders</code> interface or any way to get a subdirectory.  </p>
  
  <p>How can I get a <code>Folder</code> object which points to <code>test</code> subdir?</p>