Solved

copy File

Posted on 2001-07-23
4
407 Views
Last Modified: 2008-02-01
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:



0
Comment
Question by:ruby_yeheskel
4 Comments
 
LVL 6

Expert Comment

by:JonFish85
ID: 6308953
try:

Shell "Copy MyFile.txt LPT1"

hope this helps!
0
 
LVL 20

Accepted Solution

by:
hes earned 50 total points
ID: 6308955
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
 
LVL 3

Expert Comment

by:andysalih
ID: 6308995
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
 

Author Comment

by:ruby_yeheskel
ID: 6309039
Thanks hes,

You Answer Was Quick And Helpful !

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question