Printing Pivot Table Pages

  • Thread starter Paul Mendelowitz
  • Start date
P

Paul Mendelowitz

I have a pivot table with 25 individual data items in the
page field. I want to print a copy of the pivot table
individually for each of the 25 pages. Is there a way to
automatically do this without having to go to each page
and print it individually and manually?

Thanks for your help.

Paul
 
D

Debra Dalgleish

The following code will print the a copy of the pivot table for each
item in the page field:

Sub PrintPivotPages()
'prints a copy of each customer record from pivot table
On Error Resume Next
Dim pt As PivotTable
Dim pf As PivotField
Dim pi As PivotItem
Set pt = ActiveSheet.PivotTables.Item(1)
For Each pf In pt.PageFields
For Each pi In pf.PivotItems
pt.PivotFields(pf.Name).CurrentPage = pi.Name
' ActiveSheet.PrintOut 'use this for printing
ActiveSheet.PrintPreview 'use this for testing
Next
Next pf
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top