The following code should work if you open 1 file from each directory then run the code (1 directory at a time). Unfortunately I don't have a sutable setup to test it on.
Good Luck.
Rob
Sub Printer()
Dim PathNm As String
PathNm = ActiveWorkbook.Path
Dim FSO, Fldr, Fle, Fls
Set FSO = CreateObject("Scripting.FileSystemObject")
Set Fldr = FSO.GetFolder(PathNm)
Set Fls = Fldr.Files
For Each Fle In Fls
If Right(Fle, 4) = ".xls" Then
Workbooks.Open Filename:=Fle
Workbooks(Fle).Activate
For Each Sht In Sheets
Sht.PrintOut
Next Sht
Workbooks(Fle).Close savechanges:=False
End If
Next
End Sub
Rob: Thanks, might need some fine tuning
Tried your code; it seems to be heading in the right direction but paused twice:
1) Asks if I want to update links to other worksheets. The answer will always be "yes". Can you suggest the appropriate code?
2) After opening one of the other xls files in the directory (I tried the macro out on a directory which only has 3 files), it flashed this error message: "run time error '13': type mismatch", and clicking "de-bug" highlighted the line : "Workbooks(Fle).Activate"
Rob, I really apreciate your help. In case we can't get this to work, perhaps you could go ahead and suggest something which could be used one file at a time; this would still be easier than what I've been doing.
Thanks again,
Dwight
Re: Rob: Thanks, might need some fine tuning
This bit will do the printing of all sheets.
For Each Sht In Sheets
Sht.PrintOut
Next Sht
Sorry it didn't work completely.
R.
No apology necessary. This is very useful, Thanks! NT