| |
You are here: Experts > Computing/Technology > Basic > Visual Basic > Printing a file
Expert: Amal Raj A - 11/3/2009
Question I am using VB6 and am trying to print a file without ever opening it. This can be accomplished outside of VB by right-clicking the file and then clicking 'Print'.
However, I would like to print files using this manner without opening the file in my application OR using code to physically right-click the file.
To clarify, I am trying to print a file by simply knowing it's path & filename. Certainly there is a way to do this in VB6.
I appreciate your help in advance!
Answer Hi Enoctis,
I cannot provide you the complete code for now. But I can offer some tips. You would need to use the shell command in conjunction with the DOS type command to print the file without opening it.
This is to just emulate the DOS command type filetoprint.txt > prn, where the command (directs) prints the file "filetoprint.txt" to the printer.
Hope this helps.
Regards,
Amal
Add to this Answer Ask a Question
|
|