View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
F J F J is offline
external usenet poster
 
Posts: 5
Default Print entire workbook with each sheet starting at page 1

On May 23, 6:21*am, "Vacuum Sealed" wrote:
Hi

Try it this way and see how it looks

Sub test()
* * Dim ws As Worksheet
* * For Each ws In ActiveWorkbook.Worksheets
* * * * With ActiveSheet.PageSetup
* * * * * * .FirstPageNumber = 1
* * * * * * .CenterHeader = "Page &P of &N"
* * * * End With
* * *Next ws
* * ActiveWorkbook.PrintOut Copies:=1, preview:=False
End Sub

HTH
Mick


Hi, Vacuum Sealed, thanks for your response. It still prints to PDF
with the total number of pages in the entire workbook rather than the
total number of pages for each sheet. I guess maybe there's no way to
do it when printing to PDF.