Trying to print without opening the document....

T

Tim needs help

I'm trying to print excel files witout having to open the document. I have a
master file that I make changes to, which changes all the other files. I
then want to print all the other files all at the same time without having to
go into them and open them up. Any sugguestions???????
 
R

Ron de Bruin

With a macro you can open and print them

Try this one for all Excel files in the folder C:\Data

Sub TestFile1()
Dim i As Long
Dim WB As Workbook
Application.ScreenUpdating = False
With Application.FileSearch
.NewSearch
.LookIn = "C:\Data"
.SearchSubFolders = False
.FileType = msoFileTypeExcelWorkbooks
If .Execute() > 0 Then
For i = 1 To .FoundFiles.Count
Set WB = Workbooks.Open(.FoundFiles(i))
WB.PrintOut
WB.Close False
Next i
End If
End With
Application.ScreenUpdating = True
End Sub
 
Top