R
ripal.soni
To Print file on your selected printer instead of default printer you
can write the following code
also you can find the complete solution in
http://ripalsoni.wordpress.com/2007/04/25/print-pdf-file-in-vbnet-by-giving-printer-name/
Dim pathToExecutable As String = "AcroRd32.exe"
Dim sReport = "C:Test.PDF" 'Complete name/path of PDF file
Dim SPrinter = "HP Officejet 5600 seriese" 'Name Of printer
Dim starter As New ProcessStartInfo(pathToExecutable, "/t " + sReport
+ " " + sPrinter + "")
Dim Process As New Process()
Process.StartInfo = starter Process.Start()
the above code will print your pdf file on the printer you want ,you
can also print word document by the same way just change your
executable file path from Acrobat32.exe to word exe
Thanks
Ripal Soni
can write the following code
also you can find the complete solution in
http://ripalsoni.wordpress.com/2007/04/25/print-pdf-file-in-vbnet-by-giving-printer-name/
Dim pathToExecutable As String = "AcroRd32.exe"
Dim sReport = "C:Test.PDF" 'Complete name/path of PDF file
Dim SPrinter = "HP Officejet 5600 seriese" 'Name Of printer
Dim starter As New ProcessStartInfo(pathToExecutable, "/t " + sReport
+ " " + sPrinter + "")
Dim Process As New Process()
Process.StartInfo = starter Process.Start()
the above code will print your pdf file on the printer you want ,you
can also print word document by the same way just change your
executable file path from Acrobat32.exe to word exe
Thanks
Ripal Soni