Trying to print without opening the document....

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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???????
 
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
 

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