Solved

copy File

Posted on 2001-07-23
4
404 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
Comment Utility
try:

Shell "Copy MyFile.txt LPT1"

hope this helps!
0
 
LVL 20

Accepted Solution

by:
hes earned 50 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks hes,

You Answer Was Quick And Helpful !

0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now