D
Dean Richardson
Hello,
I have having issues with threading. Below is the code I am running:
'Prints the word doc
myWordApp.ActivePrinter = cboPrintList.SelectedItem
myWordApp.PrintOut()
'Sets the default printer back
myWordApp.ActivePrinter = strDefaultPrinter
'Pauses until the word document is printed
System.Threading.Thread.Sleep(2000)
'Closes the word document
myWordApp.Quit(False)
The issue is that the word document is still printing in word as the
Word Application closes, so the document never prints.
Is there a way to have quit word once the printing has finished by
using threads. I am quite new to threading, so I'm probably missing
something obvious (or not).
Many Thanks in Advance,
Dean
I have having issues with threading. Below is the code I am running:
'Prints the word doc
myWordApp.ActivePrinter = cboPrintList.SelectedItem
myWordApp.PrintOut()
'Sets the default printer back
myWordApp.ActivePrinter = strDefaultPrinter
'Pauses until the word document is printed
System.Threading.Thread.Sleep(2000)
'Closes the word document
myWordApp.Quit(False)
The issue is that the word document is still printing in word as the
Word Application closes, so the document never prints.
Is there a way to have quit word once the printing has finished by
using threads. I am quite new to threading, so I'm probably missing
something obvious (or not).
Many Thanks in Advance,
Dean