I want to print PDF files on a network printer placed on my print server. I written the code below, and it works for local printers only. When I use a network printer name, it doesn't not work.
Dim ProcessoImp As New Process
Dim VerToUse As String
VerToUse = "PrintTo"
ProcessoImp.StartInfo.CreateNoWindow = False
ProcessoImp.StartInfo.Verb = VerToUse
ProcessoImp.StartInfo.FileName = PrintFileList(i)
ProcessoImp.StartInfo.Arguments = "\\PrintServerMachine\samsung laser"
ProcessoImp.Start()
ProcessoImp.WaitForExit(10000)
ProcessoImp.CloseMainWindow()
ProcessoImp.Close()
Remember that if I use a local printer, it works perfectly, but if it's a network printer, it does not work!
What can I do to solve this problem?