
Printing directly to LPT1: - bypassing the printer driver
try this: OPEN Printer.Port FOR OUTPUT AS #2
then you can:
Print #1, Space(10) & "DEPO Report for: " & Site & " for the month of: " &
Month
Print #1, Space(10) & String(60, 95)
Print #1, vbCrLf
or whatever else you'd like to do...
HiH's
Cliff
Quote:
> I would greatly appreciate any on this problem:
> For years I have been happily printing away (in VB 3) to networked HP
> Laserjets. I don't use the printer object - I pass the raw printer codes to
> the printer like this:
> OPEN "LPT2.PRN" FOR OUTPUT AS #2
> PRINT #2, CHR$(24)+"E" ' Init laserjet
> etc.
> CLOSE #2
> I control cursor positioning, fonts etc. with a set of functions that produce
> the appropriate PCL control codes. I was thus able to move over a lot of QB
> 4.5 code with no work at all.
> The problem: now I want to print to a local printer (to make some labels on
> an Epson compatible dor matrix printer). I tried:
> OPEN "LPT1.PRN" FOR OUTPUT AS #1
> and get a 'Path/File access error'. Why? How come it works for LPT2 but not
> LPT1?
> Many TIA
> Bill Trembath
> North Vancouver, B.C.
> Canada
--
****************************************
NOTICE TO BULK EMAILER(S):
Pursuant to US Code, Title 47, Chapter
5, Subchapter II, 227, any & all
unsolicited commercial e-mail sent to
this address is subject to a download
and archival fee in the amount of
$500 US and copies will be forwarded
to domain administrators--E-mailing
denotes acceptance of said terms!
****************************************