Hi! Can someone help me?
I captured text output to a local disk file. When I supply the following PrintFile() with a printer port, chosen by the user in a drop-down combo box populated by 'aprinters()', it works fine as long as the printerPort is on a networked machine. But the same methodology fails when I'm actually on the machine doing the printing. To clarify, I have a presario computer etherneted to a second machine, 'stevenson', which itself is ethernetted to a hewlet packard print hub that connects directly to a lexmark printer. When the presario selects "\\stevenson\lexmark" as a printer port, printing occurs without a hitch. However, when I'm on the 'stevenson' machine, simply using "lexmark" as the printerport always results in "Printer not Ready", even though I can print test pages (via the windows printer panel) all day without a hitch. I'm using visual foxpro 6. The stevenson machine uses Windows XP, and the Presario uses Window ME. Here is the code:
procedure PrintFile
lparameters lcTextFile, lcPrinterPort
if empty(m.lcPrinterPort)
return
endif
set console off
set headings off
set printer to &lcPrinterPort
type (m.lcTextFile) to printer
set printer to
set headings on
set console on
return
Anyhelp would realy be appreciated...I don't understand the pring commands at all.
Sincerely,
Alan J Wayne
p.s. I tried the 'set printer to name 'printer'' with the same result...This is quite fustrating.
I captured text output to a local disk file. When I supply the following PrintFile() with a printer port, chosen by the user in a drop-down combo box populated by 'aprinters()', it works fine as long as the printerPort is on a networked machine. But the same methodology fails when I'm actually on the machine doing the printing. To clarify, I have a presario computer etherneted to a second machine, 'stevenson', which itself is ethernetted to a hewlet packard print hub that connects directly to a lexmark printer. When the presario selects "\\stevenson\lexmark" as a printer port, printing occurs without a hitch. However, when I'm on the 'stevenson' machine, simply using "lexmark" as the printerport always results in "Printer not Ready", even though I can print test pages (via the windows printer panel) all day without a hitch. I'm using visual foxpro 6. The stevenson machine uses Windows XP, and the Presario uses Window ME. Here is the code:
procedure PrintFile
lparameters lcTextFile, lcPrinterPort
if empty(m.lcPrinterPort)
return
endif
set console off
set headings off
set printer to &lcPrinterPort
type (m.lcTextFile) to printer
set printer to
set headings on
set console on
return
Anyhelp would realy be appreciated...I don't understand the pring commands at all.
Sincerely,
Alan J Wayne
p.s. I tried the 'set printer to name 'printer'' with the same result...This is quite fustrating.