Can you send an entire text file to the printer, or do you have to read the file and send it line by line? Thanks, Abby
You can send the entire file to the printer. Code: Dim iFile%, sText$ iFile = FreeFile Open "c:\MyFile.txt" For Input As #iFile sText = Input(LOF(iFile), iFile) Close #iFile Printer.Print sText Printer.EndDoc An other way is to shell Notepad to do the job for you: Code: Call Shell("Notepad.exe /p c:\MyFile.txt", vbHide) Good luck!
Dim iFile%, sText$ iFile = FreeFile Open "c:\MyFile.txt" For Input As #iFile sText = Input(LOF(iFile), iFile) Close #iFile Printer.Print sText Printer.EndDoc
Call Shell("Notepad.exe /p c:\MyFile.txt", vbHide)
Forum Rules