Printing all Excel Files

robwood83

New Member
Joined
Aug 3, 2010
Messages
5
Hello,

I am working on a project and want to know how to print all excel files from a particular folder. I found some script that lets me browse for a folder just fine, but I am not sure how to print the excel files from that folder. Here is what I have right now.

Code:
Sub Test_GetFolder()
  MsgBox GetFolder("Get My Folder", ThisWorkbook.Path)
End Sub


Function GetFolder(Optional sTitle As String = "Select Folder", _
  Optional sInitialFilename As String)
  Dim myFolder As String
  With Application.FileDialog(msoFileDialogFolderPicker)
    If sInitialFilename = "" Then sInitialFilename = ThisWorkbook.Path

    .InitialFileName = sInitialFilename
    .Title = "Greetings"
    If .Show = -1 Then
      GetFolder = .SelectedItems(1)
      If Right(GetFolder, 1) <> "\" Then
            GetFolder = GetFolder & "\"
      End If
      Else: GetFolder = ""
    End If
  End With
End Function
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Welcome to the Board!

If you do an Advanced Search on this board, and search the Excel forum for "print files folder", and limit the search to "Search Titles Only", you will see some good posts that should give you most of the code you need.

Some of them deal with printing PDFs or TIFFs, but is should be easy enough to change the file extension.

Here is one to get you started.
http://www.mrexcel.com/forum/showthread.php?t=452705&highlight=print+files+folder
 
Upvote 0

Forum statistics

Threads
1,214,848
Messages
6,121,914
Members
449,054
Latest member
luca142

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top