View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Macros for Printing multiple workbooks

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

--
Regards,
Tom Ogilvy

"leavitttown" wrote:


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.


--
leavitttown
------------------------------------------------------------------------
leavitttown's Profile: http://www.excelforum.com/member.php...o&userid=36765
View this thread: http://www.excelforum.com/showthread...hreadid=564823