Share this page 

Print a documentTag(s): WSH VBScript


[printdoc.vbs]

' Word need to be installed on this machine
Dim DocToPrint, oWord, oDoc
DocToPrint = "C:\MyFile.Doc"
Set oWord = CreateObject("Word.Application")
Set oWordActiveDoc = oWord.Documents.Open("" & DocToPrint)
oWordActiveDoc.PrintOut

Set oWord = Nothing
WScript.Quit(0)