I have setup a very, very basic vbscript to print several word documents.
The script is as follows - (I have left out most of the documents, as the lines are all the same, with only the dicument name being different)
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Set objDoc = objWord.Documents.Add()
objWord.PrintOut ,,,,,,,,,,,,"C:\IT Ops Daily Check Sheet.doc"
objWord.PrintOut ,,,,,,,,,,,,"C:\DCS Overnight And Midday Poll.doc"
objWord.Quit
An MS Word Window is opened, but I get a popup message for each document as follows -
"The Margins of section 1 are outside the printable area of the page. Do you want to continue? Yes / No"
Replying yes to each popup message will allow the documents to print, but is there any way of programatically preventing this popup box from appearing (other than changing the margins, of course)
Also once the vbscript has finished, the MS Word window stays open. Is objWord.Quit the write function? How can I get the MS Word window to close from the script.
Thanks for any help, in advance.
The script is as follows - (I have left out most of the documents, as the lines are all the same, with only the dicument name being different)
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Set objDoc = objWord.Documents.Add()
objWord.PrintOut ,,,,,,,,,,,,"C:\IT Ops Daily Check Sheet.doc"
objWord.PrintOut ,,,,,,,,,,,,"C:\DCS Overnight And Midday Poll.doc"
objWord.Quit
An MS Word Window is opened, but I get a popup message for each document as follows -
"The Margins of section 1 are outside the printable area of the page. Do you want to continue? Yes / No"
Replying yes to each popup message will allow the documents to print, but is there any way of programatically preventing this popup box from appearing (other than changing the margins, of course)
Also once the vbscript has finished, the MS Word window stays open. Is objWord.Quit the write function? How can I get the MS Word window to close from the script.
Thanks for any help, in advance.