[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]


    Search the Q&A Archives


...print a text file using vb 6.0 through a printer

<< Back to: FAQ: (1/95) comp.lang.basic.visual.* General Frequently Asked Questions

Question by kiran
Submitted on 12/10/2003
Related FAQ: FAQ: (1/95) comp.lang.basic.visual.* General Frequently Asked Questions
Rating: Rate this question: Vote
how can i print a text file using vb 6.0 through a printer


Answer by hgfghf
Submitted on 2/12/2004
Rating:  Rate this answer: Vote
hgfhghhfgf
hjgjh

 

Answer by aaaaaa
Submitted on 3/15/2004
Rating:  Rate this answer: Vote
sadasd

 

Answer by kingking190
Submitted on 10/29/2004
Rating: Not yet rated Rate this answer: Vote
lolz! i don`t konw i was trying to find the same thing

 

Answer by Nguyen VAn Luong
Submitted on 10/31/2004
Rating: Not yet rated Rate this answer: Vote
How to print a text file or bipmat file in VB6.0

 

Answer by Shyam
Submitted on 11/3/2004
Rating: Not yet rated Rate this answer: Vote
Dim txtTheLine As String
Open App.Path & "\MyDataFile.TXT" For Input As 1
Printer.FontName = "times new roman"
Printer.FontSize = 12
Printer.FontBold = True
Printer.Print ""
Do While Not EOF(1)
Line Input #1, txtTheLine   'Read a line
Printer.Print txtTheLine    'send to the default printer.
Loop                        'Repeat the process of reading lines.

Printer.EndDoc  'finally stop printing after a Form Feed.
Close #1

 

Answer by ddsa sdasdsa
Submitted on 11/16/2004
Rating: Not yet rated Rate this answer: Vote
dedsadsadsadsad dsdasd d dsd ddd dsdsada

 

Answer by AL DIPUTADO MARQUINA MARIQUINA
Submitted on 11/16/2004
Rating: Not yet rated Rate this answer: Vote
Diputado mariquina, deja de estar hablando tanta paja de Chávez ya que tu tienes peores defectos, nada mas con decir que eres ADECO ya es vergonzozo y ofensivo. Vete de la asamblea perro sucio, y reconoces los logros que ha tenido el presidente chávez, indolente, charlatán, profesional de quinta categoría. Para mí que el peoque tu tienes es que chávez no te ha podido cojer, y estas jodido porque chávez no coje marico. Anda a jugar Kickinball con liliana hernández, cabeza e cotufa maricón.

 

Answer by EL DIPUTADO MARIQUINA
Submitted on 11/16/2004
Rating: Not yet rated Rate this answer: Vote
A el le llamán en el congreso el diputado mariquina, y lo que mas desea es ser chaviata pero como está tan rayado no puede serlo. Con que cuento le va a venir a Chávez.

VIVA CHAVEZ NOJODA DUACA PRESENTE

 

Answer by Balu
Submitted on 12/6/2004
Rating: Not yet rated Rate this answer: Vote
U can use the Shell command & print the text file form VB

 

Answer by J.Jaslin Santhosh
Submitted on 12/7/2004
Rating: Not yet rated Rate this answer: Vote
If our text file named by ABC.TXT. Then we have create an exe file as named by AA.EXE
The exe file contains the following codes.

in AA.EXE
!type abc.txt>prn
quit

In vb when we will print the file, on the position we have put the following coding.

Private Sub Print_Click()
dim wpath as string
dim RETVAL
wpath = App.Path + "\AA.EXE"
RETVAL = Shell(wpath, 0)
End Sub

If you have any doubts please mail me for the following ID.

jjaslin@yahoo.co.in

 

Answer by asd
Submitted on 6/22/2005
Rating: Not yet rated Rate this answer: Vote
sdfasdfasdfds

 

Answer by lol
Submitted on 7/16/2005
Rating: Not yet rated Rate this answer: Vote
Moi ksti

 

Answer by inder
Submitted on 8/17/2005
Rating: Not yet rated Rate this answer: Vote
You can Print using VB6 by using Print() method. Suppose you want to print HELLO.

Printer.Print "HELLO"
Each time you will call Print method, your output will move to next line.

Printer.Print "HELLO"
Printer.Print "How Are You"
will print your output as
HELLO
How Are You

Hope this will solve your problem

Regards
Inderdeep

 

Answer by Sirg
Submitted on 9/22/2005
Rating: Not yet rated Rate this answer: Vote
How can I print a document from a VB Application?

Using Access (to create a database)
Adobe (to Print a friendly version)

How can I call it from VB6 to Access or to Adobe?

 

Answer by tejas
Submitted on 9/27/2005
Rating: Not yet rated Rate this answer: Vote
use richtextbox control that easy use
to print file.


 

Answer by kod
Submitted on 5/31/2006
Rating: Not yet rated Rate this answer: Vote
xcvxcvxcvxc

 

Answer by Rajapriya
Submitted on 6/5/2006
Rating: Not yet rated Rate this answer: Vote
printer print<txtfile name>
printer.enddoc

 

Answer by RAJAPRIYA
Submitted on 6/5/2006
Rating: Not yet rated Rate this answer: Vote
Public Const SW_SHOWNORMAL = 1
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByValhwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long




Dim X As Long
X = ShellExecute(frmfeepayment.hWnd, "Print", FILENAME, vbNullString, 0&, SW_SHOWNORMAL)

 

Answer by dfgdf
Submitted on 8/12/2006
Rating: Not yet rated Rate this answer: Vote
gdfgdfgdf

 

Answer by robot
Submitted on 12/8/2006
Rating: Not yet rated Rate this answer: Vote
iam Questioning

 

Answer by pradeep
Submitted on 3/24/2007
Rating: Not yet rated Rate this answer: Vote
open edit in notepad
type command TYPE FILENAME.TXT > PRN
STORE IT IN SAY P.BAT (extn should be .bat)
then select ole object in vb on form and link it to this file
click to ole object and that file will print.

 

Answer by mahesh
Submitted on 6/20/2007
Rating: Not yet rated Rate this answer: Vote
i have the same problem

 

Answer by pravin
Submitted on 6/22/2007
Rating: Not yet rated Rate this answer: Vote
Public Const SW_SHOWNORMAL = 1
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByValhwnd As Long, ByVal lpOperation As String,ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Public Sub PrintThisFile(FileName As String)
Dim X As Long
X = ShellExecute(FormName, "Print",FileName, vbNullString, 0&,SW_SHOWNORMAL)
End Sub

 

Your answer will be published for anyone to see and rate.  Your answer will not be displayed immediately.  If you'd like to get expert points and benefit from positive ratings, please create a new account or login into an existing account below.


Your name or nickname:
If you'd like to create a new account or access your existing account, put in your password here:
Your answer:

FAQS.ORG reserves the right to edit your answer as to improve its clarity.  By submitting your answer you authorize FAQS.ORG to publish your answer on the WWW without any restrictions. You agree to hold harmless and indemnify FAQS.ORG against any claims, costs, or damages resulting from publishing your answer.

 

FAQS.ORG makes no guarantees as to the accuracy of the posts. Each post is the personal opinion of the poster. These posts are not intended to substitute for medical, tax, legal, investment, accounting, or other professional advice. FAQS.ORG does not endorse any opinion or any product or service mentioned mentioned in these posts.

 

<< Back to: FAQ: (1/95) comp.lang.basic.visual.* General Frequently Asked Questions


[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]

© 2008 FAQS.ORG. All rights reserved.