title: Get all elements listed in a pivot table filter (page field) with VBA
body: <p>I need to print a PDF output for each name in the page field list (highlighted in the image below). It shouldn't be the best approach, but I thought I'd get the list with all the available names and go filtering with a vba loop.</p>
  
  <p><a href="https://i.stack.imgur.com/y4qJa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y4qJa.png" alt="enter image description here"></a></p>
  
  <pre><code>For Each Item In pvt.PivotFields("[LANC].[NAME].[NAME]").VisibleItemsList
      Debug.Print Item
  Next
  </code></pre>
  
  <p>The problem that only works by selecting n-1 from the n elements in the list. If you select all, the field is set to "all" and VisibleItemsList returns an empty element.</p>