Batch Printing of Files from ExcelLast reviewed: November 2, 1994Article ID: Q48144 |
The information in this article applies to:
SUMMARYThe following macro prints a batch of files that are all found in the same directory. It requests a directory name and then prints all the files in that directory.
A1: Batch Print A2: =INPUT("Input the Directory of the files to print",2,"Batch Print Directory") A3: =DIRECTORY(A2) A4: =COLUMNS(FILES("*.xl?")) A5: =FOR("count",1,A4,1) A6: =OPEN(INDEX(FILES("*.xl?"),count),FALSE,FALSE) A7: =PRINT() A8: =CLOSE() A9: =NEXT() A10: =RETURN()If you are using Microsoft Excel for the Macintosh, you need to change lines A4 and A6 as follows:
A4: =Columns(files(":*")) A6: =Open(Index(Files(":*"),count),false,false)If the directory contains more than 20 files and you are using versions of Microsoft Excel with Microsoft Windows 2.x or the run-time Microsoft Excel, the spooler should be disabled through the WIN.INI file by setting spooler=no. If you are using Microsoft Windows 3.0 or greater, remove the check in the Use Print Manager check box in the Printers dialog box in the Microsoft Windows 3.0 Control Panel.
|
KBCategory: kbusage
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |