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)



If you find this article useful, consider making a small donation
to show your support for this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2012
[ home ]