View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
user user is offline
external usenet poster
 
Posts: 44
Default printing multiple sheets in one print job

I have a macro that prints several pivot items (about 75 in total) but I need
them to come out in a single print out. Could anyone shed me some light? This
is the code of my macro:

Thanks!

With ActiveSheet.PivotTables("PivotTable1")


For Each pvtItems In .PivotFields("ItemList").PivotItems
ItemCount = ItemCount + 1

ItemName = .PivotFields("ItemList").PivotItems(ItemCount).Nam e
.PivotFields("ItemList").CurrentPage = ItemName

ActiveWindow.SelectedSheets.PrintOut From:=1,
To:=Range("MaxPages").Value, Copies:=Range("MaxNoCopies").Value,
printtofile:=True, Collate:=True, PrToFileName:=ItemFileName

Next

End With