
Printing Directly to Printer
I would think that a statement klike
copy /b test.txt LPT1:
(note the colon on the end of LPT1:) would work in a .bat file that you
executed via Shell. However, another approach would be to use the normal
Basic file I/O commands to open and read the text file and write its
contents to the pseudo-file "LPT1:". I know for a fact you can open and
write to "LPT1:" as a binary file.
--
Dirk Goldgar
(to reply via email, remove NOSPAM from address)
Quote:
>I have a text file full of printer commands that I would like to send to
the
>printer by using VBA code in Access.
>Normally, in DOS, I would type the following:
>Copy /b test.txt LPT1
>The codes when then go to the printer and the printer would print as
>expected. I have tried the Shell command with no luck. I did put the
command
>into a .bat file, however, LPT1 wasn't recognized for some reason. Also, I
>need to build the statement based on selections by the user (ie which port
>and which file), so a batch file just isn't what I am looking for. I have a
>deadline on this and any help would be appreciated. Thanks.
>Mike