copy File

How Do I Copy A Txt File To LPT1 Port (Visual Basic 6)?
I Know That With The Ms-Dos It Goes Like This :

Copy MyFile.txt LPT1:



ruby_yeheskelAsked:
Who is Participating?
 
hesCommented:
Open MyFile For Input As #1
    Open "LPT1" For Output As #2

    TempString = Input(LOF(#1), #1)

    Print #2, TempString;

    Close #1
    Close #2
0
 
JonFish85Commented:
try:

Shell "Copy MyFile.txt LPT1"

hope this helps!
0
 
andysalihCommented:
or  you could

open "myfile.txt" for input as#1

while not eof(1)
input #1,string
printer.print string
wend

printer.enddoc
close#1
end sub


hope that helps
this will use your current print driver installed.

cheers
Andy


0
 
ruby_yeheskelAuthor Commented:
Thanks hes,

You Answer Was Quick And Helpful !

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.