View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Automated Printing

The easiest might be to pull a copy of all the sheets into a single
workbook, group the sheets and print the workbook. Then delete this dummy
workbook.

Sub Print4Books()
Dim wkbk as Workbook
' create new book with sheets from first workbook
Workbooks("Book1.xls").Sheets.copy
' set a reference to the new workbook
set wkbk = ActiveWorkbook
' copy sheets from second
Workbooks("Book2.xls").Sheets.Copy _
After:=wkbk.worksheets(wkbk.worksheets.count)
' copy sheets from third
Workbooks("Book3.xls").Sheets.Copy _
After:=wkbk.worksheets(wkbk.worksheets.count)
' copy fourth
Workbooks("Book4.xls").Sheets.Copy _
After:=wkbk.worksheets(wkbk.worksheets.count)
' print sheets
wkbk.WorkSheets.Select
wkbk.Windows(1).SelectedSheets.Printout
' delete wkbk
wkbk.close SaveChanges:=False

End Sub

Assumes the workbooks are all open when you run the macro.


--
Regards,
Tom Ogilvy

"Brady Snow" wrote in message
...
Maybe somebody has encountered a request similar to
his... I have a user that has 3 or 4 different workbooks
and he wants to print all of them with consecutive page
numbers. The user now spends hours doing the page
numbering. What would be the best way to handle this in an
automated fashion?

Many thanks!

Brady Snow
McKinney, Texas