ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   printing multiple sheets in one print job (https://www.excelbanter.com/excel-programming/377431-printing-multiple-sheets-one-print-job.html)

user

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



All times are GMT +1. The time now is 08:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com