jlmacdonald
Member
- Joined
- Apr 16, 2007
- Messages
- 7
- Programming Experience
- 1-3
This is probably an easy question but the more I've searched the more confused I got. I have a printbot program that will print out a batch of HTML files in a pending directory and then move them to a printed directory. The snag that I've run into is the actual printing. I don't need or want to open the HTML documents before printing. The snippet of code I have been using is:
This will work fine but it will launch a print dialog box for every file it print and because I need it automated to print batches I can't have it displayed. I have also looked at the printdocument and couldn't get over how complicated it was. I just need it to print an HTML document without opening it up first and have the program to use the default printer. Is there an easy way to do this?
Thanks for any help.
VB.NET:
PrivateSub PrintFile(ByVal filePath AsString)
Dim myprocess AsNew Process
Dim psi AsNew ProcessStartInfo
psi.FileName = filePath
psi.Verb = "print"
myprocess.StartInfo = psi
myprocess.Start()
EndSub
Thanks for any help.