Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Automating the printing of a document

Reply
 
Old 01-01-2009   #1 (permalink)
Tcs


 
 

Automating the printing of a document

Is there a way that I can automate the printing of a document to my
printers?

I have a document, that I want to send to each of our printers. Can I
do this via vbscript?

Thanks in advance,

Tom

My System SpecsSystem Spec
Old 01-01-2009   #2 (permalink)
Reventlov


 
 

Re: Automating the printing of a document

Il giorno Thu, 01 Jan 2009 09:29:48 -0500, Tcs <someone@xxxxxx> ha scritto:
Quote:

>Is there a way that I can automate the printing of a document to my
>printers?
>
>I have a document, that I want to send to each of our printers. Can I
>do this via vbscript?
There are several ways to print a document, depending on the application. You can ask
MsWord to do it for you if it is a doc.

This prints all files in a folder just like selecting the print verb from the context menu
(right click on the file). You should select the pdf printer as the default printer first.

TargetFolder = "C:\documenti\temp"
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(TargetFolder)
Set colItems = objFolder.Items
For Each objItem in colItems
objItem.InvokeVerbEx("Print")
Next

I think you can set the default printer with WMI scripts. I haven't any, but you can
download scriptomatic from ms site to generate one for your purposes.
--
Giovanni Cenati (Bergamo, Italy)
Write to "Reventlov" at katamail com
http://digilander.libero.it/Cenati (Esempi e programmi in VbScript)
--
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Unwanted vertical lines when printing a Word document with an imag Vista print fax & scan
Printing queue, printed document residual artifact, time to print (multiple query) Vista print fax & scan
Printing A Document Selected From A Drop Down List .NET General
Printing to XPS Document writer Vista print fax & scan
Re: XPS Viewer and Printing to MS XPS Document Writer Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46