Thread: Print workbook
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
David
 
Posts: n/a
Default Print workbook

Leith Ross wrote


Hello Gordon,

I can give you the code to print the worksheets, but pages number in
Excel are a quite another matter as Excel doesn't provide any VBA code
to automate accessing, calculating. or manipulating page numbers.


Sub PrintWorksheets()
Dim Wks As Worksheet
For Each Wks In ThisWorkbook.Worksheets
Wks.PrintOut
Next Wks
End Sub

Sincerely,
Leith Ross



How about this for page#'s?:
Range("A1") = ExecuteExcel4Macro("Get.Document(50)")

--
David