?
Solved

Printing a File

Posted on 1998-10-19
5
Medium Priority
?
166 Views
Last Modified: 2010-04-30
How can I print a File in Hard disk, from VB environment??
Any sample code ???
Thanx
0
Comment
Question by:anilkumarv
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 14

Accepted Solution

by:
waty earned 0 total points
ID: 1440513
nFile = FreeFile
Open sFile For Input Access Read As #nFile
sLine = ""
Do While EOF(nFile) = False
   Line Input #nFile, sLine
   Printer.Print sLine
Loop
Close #nFile
Printer.EndDocument
0
 

Expert Comment

by:re03589j
ID: 1440514
Another way, you can use a printer driver called PDFPrinter. This printer driver has a free version in internet. You can print everything (text, graphics...) in a file: a file name is asked for when you print to this driver.
0
 
LVL 12

Expert Comment

by:fulscher
ID: 1440515
re03589j,

could you provide more info about the "PDFprinter" (I'd be willing to spend some points)

Thanks

0
 

Author Comment

by:anilkumarv
ID: 1440516
Thanx
0
 
LVL 1

Expert Comment

by:Renato102098
ID: 1440517
Ud. puede definir en configuración de la impresora, entrar en propiedades, luego en detalle seleccionar el puerto de la impresora "file" en vez de lpt1 ...
Puede hacer una copia del controlador de la impresora y tener uno en lpt1 y otro en file, en el momento de la impresión se le preguntará el nombre de archivo que desea generar.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
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…
Suggested Courses
Course of the Month9 days, 16 hours left to enroll

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