Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Printing a File

Posted on 1998-10-19
5
Medium Priority
?
170 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

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…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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 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…
Suggested Courses

610 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