If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Print all .xls files in selected directory
Does anyone know of a way that i can create a macro that prints all .xls
files in a particular diretory? Thanks --- Message posted from http://www.ExcelForum.com/ |
#2
|
|||
|
|||
Try:
Sub PrintAllinFolder() Dim i As Long Dim WB As Workbook Application.ScreenUpdating = False With Application.FileSearch .NewSearch .LookIn = "C:\My Documents\MyFolderName" .SearchSubFolders = False .FileType = msoFileTypeExcelWorkbooks If .Execute() 0 Then For i = 1 To .FoundFiles.Count Set WB = Workbooks.Open(.FoundFiles(i)) WB.PrintOut WB.Close SaveChanges:=False Next i End If End With Application.ScreenUpdating = True End Sub Feedback appreciated... I use Excel - XP Jim May "LB79 " wrote in message ... Does anyone know of a way that i can create a macro that prints all .xls files in a particular diretory? Thanks --- Message posted from http://www.ExcelForum.com/ |
#3
|
|||
|
|||
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I print the details view | David | Running & Setting Up Queries | 5 | August 28th, 2004 12:17 AM |
problems initiating mplay32.exe | electricrainbowfish | Powerpoint | 8 | July 8th, 2004 09:37 AM |
Office XP | Ed Lester | Setup, Installing & Configuration | 1 | May 27th, 2004 09:30 AM |
horizontal bar chart print settings messed up when all sheets selected | Mary | Charts and Charting | 0 | April 15th, 2004 07:46 PM |
Filtering Worksheets To Print Only What you selected | esmith | Worksheet Functions | 1 | October 22nd, 2003 07:57 PM |