The following is a direct quote for the Windows 2000 Scripting Guide
<begin quote>
Be aware that verbs always function in exactly the same way they do
when clicked in Windows Explorer. If you right-click a file and select
Open, the file automatically opens. If you select Delete, however, a
confirmation box is displayed before the file is deleted. This same
confirmation box appears if you attempt to delete any object using
InvokeVerbEx. For example, using the Delete verb on a file results in
a dialog box similar to the one shown in Figure 11.8.
By comparison, right-clicking a file and selecting Print does not
display a dialog box; instead, the file is automatically printed to
the default printer. If you use InvokeVerbEx to print a file
programmatically, that file is automatically printed to the default
printer without displaying a dialog box of any kind.
</end quote>
And here is the sample code:
TargetFolder = "C:\Logs"
set objShell = CreateObject("Shell.Application")
set objFolder = objShell.Namespace(TargetFolder)
set colItems = objFolder.Items
for each objItem in colItems
wscript.echo objItem.Name
objItem.InvokeVerbEx("Print")
next
Contrary to what is printed a dialog box DOES appear for "every" file
print. I can not seem to find any information on the optional
parameter.
Does anyone know of a way to make InvokeVerbEx perform as documented -
I want to invoke the print verb on a file without any user
intervention.
Thanks
Lee