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
 

Some videos you may like

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
54,178
Office Version
365
Platform
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
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,618
Messages
5,512,438
Members
408,896
Latest member
elizabethtaylor

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top