title: Is there a Macro for printing a pivot table per report filter to a combined PDF file
body: <p>I have a Macro that prints all of the pivot tables per report filter (name). If I print to pdf it prints every pivot table individually. What I want to do is that every pivot table (per filter option) gets combined in one pdf file. Below is the code I currently work with. I was hoping that someone knew how to adjust the print.out part to combine all the pivots to one pdf</p>
  <pre><code>Sub PrintAll()
  '
  ' PrintAll Macro
  ' Print activity table for all employees
  '
  Response = MsgBox(&quot;Do you want to print the overview of all employees?&quot;, vbYesNo)
  If Response = vbNo Then Exit Sub
   
  ' always refresh the table
  ActiveSheet.PivotTables(&quot;PivotTable1&quot;).PivotCache.Refresh
     
  On Error Resume Next
  Dim pf As PivotField
  Dim pi As PivotItem
  Set pf = ActiveSheet.PivotTables(&quot;PivotTable1&quot;).PivotFields(&quot;name&quot;)
     
    For Each pi In pf.PivotItems
     
      ActiveSheet.PivotTables(&quot;PivotTable1&quot;).PivotFields(&quot;name&quot;).CurrentPage = pi.Name
   
  ' now check whether the current page is indeed the desired one,
  ' if not, the page of that e,mployee is empty so don't print
   
      If ActiveSheet.PivotTables(&quot;PivotTable1&quot;).PivotFields(&quot;name&quot;).CurrentPage.Caption = pi.Caption Then
   
      End If
    Next
          ActiveSheet.PrintOut  'use this for printing
  '    ActiveSheet.PrintPreview  'use this for testing
  '
  End Sub
  </code></pre>