My printer works normally, but when I want to print with VB.Net, it stays in the spooling section. How can I print word file from the printer?
Dim wordApp As New Application()
Dim doc2 As Document = wordApp.Documents.Open(Locate & "\Document.docx")
Try
doc2.PrintOut()
' Close the document
doc2.Close()
' Quit the Word application
wordApp.Quit()
Catch ex As Exception
MessageBox.Show("Error: " & ex.Message)
End Try