Hi Guys
I Have an issue with he code below that i have been struggling with for a while, what i want to do is print a word document to a printer that has been selected
after selecting a new printer the word document is alsways printed to the pc's default printer, not the one that has just been selected.
if i change
Application.Dialogs(xlDialogPrinterSetup).Show
to
Application.Dialogs(xlDialogPrint).Show
after changing the printer there its still printing to the defualt printer as well
any help would be fantastic
Steve
I Have an issue with he code below that i have been struggling with for a while, what i want to do is print a word document to a printer that has been selected
Rich (BB code):
Dim objWord
Dim objDoc
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Open("\\server1\tests\testresults.doc")
objWord.Visible = False
' First choose a printer by using the printer select window, then we print out the document
Application.Dialogs(xlDialogPrinterSetup).Show
objDoc.PrintOut
' The Code Below Shows a Message Box Confirming That The Document Has Been Printed
MsgBox "Your Document Has Been Printed"
'then we quit word
objWord.Quit
'then we release the memory that word has been using
Set objDoc = Nothing
Set objWord = Nothing
after selecting a new printer the word document is alsways printed to the pc's default printer, not the one that has just been selected.
if i change
Application.Dialogs(xlDialogPrinterSetup).Show
to
Application.Dialogs(xlDialogPrint).Show
after changing the printer there its still printing to the defualt printer as well
any help would be fantastic
Steve