title: How to iterate all mail folders in all accounts with ID and name in Outlook 2016 for Mac
body: <p>I use raw queries to sort mail in Outlook 2016 for Mac using the "smart folders". The queries work well with folder ID's. I've used a script to tell me the Current Folder I'm clicked on in Outlook, but I'd like to get a script together that just prints out all the folders for all the mail accounts with ID's so that I have a cheat sheet of folder ID's and names. I can get all the ID's to print, just not the names with them. Anybody know how to do this?</p>
  
  <p>Here's the code I have so far, just need the name to print out.</p>
  
  <pre><code>tell application "Microsoft Outlook"
  set allMailFolders to get mail folders
  repeat with currentFolder in allMailFolders
      get currentFolder
  end repeat
  end tell
  </code></pre>