title: How to print a word document without opening word
body: <p>I am currently using the following code to print a word document</p>
  
  <pre><code>                Dim oWordApp As Word.Application
                  Dim oTargetDoc As Word.Document
                  oWordApp = New Word.Application
  
                  Select Case Priority
                      Case 1
                          oWordApp.WordBasic.FilePrintSetup(Printer:=printPriority1, DoNotSetAsSysDefault:=1)
                      Case 2
                          oWordApp.WordBasic.FilePrintSetup(Printer:=printPriority2, DoNotSetAsSysDefault:=1)
                      Case 3
                          oWordApp.WordBasic.FilePrintSetup(Printer:=printPriority3, DoNotSetAsSysDefault:=1)
                      Case 4
                          oWordApp.WordBasic.FilePrintSetup(Printer:=printPriority4, DoNotSetAsSysDefault:=1)
                      Case 5
                          oWordApp.WordBasic.FilePrintSetup(Printer:=printPriority5, DoNotSetAsSysDefault:=1)
                  End Select
  
                  oTargetDoc = oWordApp.Documents.Open(DocumentName &amp; ".doc")
                  oWordApp.PrintOut()
                  oWordApp.Documents.Close()
                  oWordApp.Quit()
  </code></pre>
  
  <p>However I have found it to be buggy with our shared printers, this bug only happens when printing using word. It works fine when doing print automation with PDFs(Adobe Reader) etc.</p>
  
  <p>What I am looking for is some code in vb.net which will allow me print this documents and I have to be about to specify the printer it uses.</p>
  
  <p>Thanks!</p>