Printing Directly to Printer 
Author Message
 Printing Directly to Printer

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



Sun, 30 Jun 2002 03:00:00 GMT  
 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



Mon, 01 Jul 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Printing directly to printer w/o using Print Manager

2. How to print directly to printer?

3. Printing directly to printer port

4. Printing directly to printer

5. Print directly to Printer

6. Printing directly to printer...how to?

7. printing directly to printer from web

8. Urgent! Print Directly to printer

9. Print directly to the printer

10. print directly to win2k printer share?

11. Printing directly to a printer

12. Printing directly to a printer from VB.

 

 
Powered by phpBB® Forum Software