Home > Archive > Programming with dBASE > May 2005 > Sending a Text file to print doubt









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Sending a Text file to print doubt
Rafael Carrazco

2005-05-04, 8:23 pm

Hi all dBASE friends!
I have a doubt

How to send a text file (mytext.txt) to print to a network printer directly
from dbase code??

I used to print the text file to a local printer in the lpt1 port:

set printer to lpt1
set headings off
type &CFILENAME to print
set headings on

And works great,
but now I need to send the same text file to a printer in the network

Can you help me please??

Thank you!

Rafa


Marc Hamelin

2005-05-04, 8:23 pm

If you have Windows 2000, 2003 or XP, perhaps you could map the network
printer as LPT2 and do the same thing you are doing normally...

RUN(false, "net use LPT2 \\networkPath\networ
kPrinterName")

set printer to LPT2
set headings off
type &CFILENAME to print
set headings on

RUN(false, "net use LPT2 /delete")

Marc Hamelin


Rafael Carrazco

2005-05-07, 3:23 am

Thank you Marc, Im going to try it
by the way, is another way to printa text file than the type command/??

Rafa
"Marc Hamelin" <m.hamelin@nospam-rasakti.com> wrote in message
news:XhM5qOOUFHA.432@news-server...
> If you have Windows 2000, 2003 or XP, perhaps you could map the network
> printer as LPT2 and do the same thing you are doing normally...
>
> RUN(false, "net use LPT2 \\networkPath\networ
kPrinterName")
>
> set printer to LPT2
> set headings off
> type &CFILENAME to print
> set headings on
>
> RUN(false, "net use LPT2 /delete")
>
> Marc Hamelin
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com