Link to home
Start Free TrialLog in
Avatar of DonH040699
DonH040699

asked on

Print a Text File

Can I print a .txt file without opening it first? No formatting or page breaks are required. All I would need is for the program to print a predetermined file name and quit.
ASKER CERTIFIED SOLUTION
Avatar of Dr. Kamal Mehdi
Dr. Kamal Mehdi
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KDivad
KDivad

Without opening it? Sure, if you don't mind "bouncing" it off command.com.

x = Shell("command /c copy " & MyFile & " lpt1")
Avatar of DonH040699

ASKER

Kamall,

I put your suggested code in a function and it worked great. VB showed me what else I could do with Print. and I wound up with a very useful untility. Thanks!
You are welcome.