Solved

Printing a File

Posted on 1998-10-19
5
157 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…

740 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