Solved

copy File

Posted on 2001-07-23
4
406 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

776 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