Hi
No, you must open them
Something like this will work
Sub Test()
Dim basebook As Workbook
Dim mybook As Workbook
Dim FNames As String
Dim MyPath As String
MyPath = CurDir
FNames = Dir("*.xls")
If Len(FNames) = 0 Then
MsgBox "No files in the Directory"
ChDrive SaveDriveDir
ChDir SaveDriveDir
Exit Sub
End If
Application.ScreenUpdating = False
Do While FNames < ""
Set mybook = Workbooks.Open(FNames)
mybook.PrintOut
mybook.Close False
FNames = Dir()
Loop
Application.ScreenUpdating = True
End Sub
--
Regards Ron de Bruin
http://www.rondebruin.nl
"petecjr" wrote in message ...
I use the following VBA code to print out all files in a folder in MS Word
instantly in the background without opening the documents. When I tried to
use it in MS Excel I received a message indicating that the Application
object in Excel doesn't support the PrintOut method. Is there a way to do
this in Excel? Thanks for any help.
With Application.FileSearch
.FileName = "*.*"
.LookIn = CurDir
If .Execute(msoFileFindSortbyFileName, _
SortOrder:=msoSortOrderAscending) 0 Then
For I = 1 To .FoundFiles.Count
Application.PrintOut FileName:= .FoundFiles(I)
Next I
End If
End With