title: Get the list of Outlook Categories from specific Account
body: <p>So I have the following code working, it is a UserForm and basically what it does here is to fill a ComboBox with each Category my Outlook Account has.</p>
  
  <p>However, it only works for main set-up account, and I can't find a way to make it get the categories from a previously selected account (with another combobox).
  The code looks like this:</p>
  
  <pre><code>Private Sub UserForm_Initialize()
  
      Dim objNameSpace As NameSpace
      Dim objCategory As Category
      Dim strOutput As String
  
      Set objNameSpace = Application.GetNamespace("MAPI")
          If objNameSpace.Categories.Count &gt; 0 Then
              For Each objCategory In objNameSpace.Categories
                  strOutput = objCategory.Name    
          With Me.ChosenCategory
          .AddItem (strOutput)
          End With     
              Next    
          With Me.ChosenCategory
          .AddItem ("Clear Category")
          End With
  
          End If
  
  End Sub
  </code></pre>
  
  <p>Does anyone know how to specify first which Account do I want it to get the categories from? </p>