Macros for Printing multiple workbooks

  • Thread starter Thread starter leavitttown
  • Start date Start date
L

leavitttown

Is there a way to write a macro that will print out multiple workbooks
contained in a common folder without having to open up each workbook
individually?

Thanks in advance.
 
Have a macro open them for you:

Sub Printbooks()
Dim sName as String, bk as Workbook
sname = dir("C:\Myfolder\*.xls")
do while sName <> ""
set bk = workbooks.Open("C:\Myfolder\" & sName)
bk.Printout
bk.close Savechanges:=True
sName = dir
Loop
End sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top