Thursday, May 03, 2007

Print File without prompting the user

Dim MyProcess As New Process
MyProcess.StartInfo.CreateNoWindow = False
MyProcess.StartInfo.Verb = "print"
MyProcess.StartInfo.FileName = "C:\Test.pdf"
MyProcess.Start()
MyProcess.WaitForExit(10000)
MyProcess.CloseMainWindow()
MyProcess.Close()

To print all the files in the folder, just loop through all the files and pint them as above :)

reference: http://www.dnzone.com/forum/topic.asp?topic_id=89

No comments: