' Copyright (C) 2011 TechHit. All rights reserved. ' ' THIS SCRIPT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ' Option Explicit Dim objShellApp Dim argument Dim strFile If WScript.Arguments.Count < 1 Then WScript.Echo("Usage: printfile.vbs file.doc") WScript.Quit End If strFile = Wscript.Arguments(0) Set objShellApp = WScript.CreateObject("Shell.Application") objShellApp.ShellExecute strFile, "", "", "print", 0 Wscript.Sleep(5000) Set objShellApp = Nothing