title: Get email from non default inbox?
body: <p>I am using the following vba code to get emails from my inbox folder and move them to a sub folder called suppliers. At the moment the emails are moved from my default email inbox,  but I have an account called purcashing@hewden.co.uk and I want it to get the emails from this inbox and move it to the subfolder called Suppliers in this account. </p>
  
  <p>can someone show me how I would alter GetDefaultFolder to make this happen. thanks</p>
  
  <pre><code>Sub MoveItems()
   Dim myNameSpace As Outlook.NameSpace
   Dim myInbox As Outlook.Folder
   Dim myDestFolder As Outlook.Folder
   Dim myItems As Outlook.Items
   Dim myItem As Object
  
  
   Set myNameSpace = Application.GetNamespace("MAPI")
   Set myInbox = myNameSpace.GetDefaultFolder(olFolderInbox)
   Set myItems = myInbox.Items
   Set myDestFolder = myInbox.Folders("Supplier")
   Set myItem = myItems.Find("[Subject] = 'Introduction'")
   While TypeName(myItem) &lt;&gt; "Nothing"
   myItem.Move myDestFolder
   Set myItem = myItems.FindNext
   Wend
  End Sub
  </code></pre>