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

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
63,982
Office Version
  1. 365
Platform
  1. Windows
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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,168,113
Messages
5,857,454
Members
431,880
Latest member
kar2rost

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
Top