Hi All,
I am using the following code to print out a word document from a VB Program.
All machines tested on have the same setup (Windows 2000 and Office 2000) and administrator rights.
On some machines this works okay and on others the document gets opened an spooled to the printer, but never actually gets printed.
The vb program locks up, it can be ended using the task manager upon which the word document gets printed.
Set wrd = CreateObject("Word.Application"
wrd.Visible = False
Set doc = wrd.Documents.Open(Path & File & ".DOC"
doc.PrintOut
Do While wrd.BackgroundPrintingStatus <> 0
Loop
doc.Close
wrd.Quit
MsgBox "Questionnaire has been sent to your Default Printer, " & objPrinter.DeviceName, vbOKOnly, "File Printed"
Set doc = Nothing
Set wrd = Nothing
Has anybody else encountered this problem or have a solution?
regards
Dongal
I am using the following code to print out a word document from a VB Program.
All machines tested on have the same setup (Windows 2000 and Office 2000) and administrator rights.
On some machines this works okay and on others the document gets opened an spooled to the printer, but never actually gets printed.
The vb program locks up, it can be ended using the task manager upon which the word document gets printed.
Set wrd = CreateObject("Word.Application"
wrd.Visible = False
Set doc = wrd.Documents.Open(Path & File & ".DOC"
doc.PrintOut
Do While wrd.BackgroundPrintingStatus <> 0
Loop
doc.Close
wrd.Quit
MsgBox "Questionnaire has been sent to your Default Printer, " & objPrinter.DeviceName, vbOKOnly, "File Printed"
Set doc = Nothing
Set wrd = Nothing
Has anybody else encountered this problem or have a solution?
regards
Dongal