Windows Vista Forums

Automating the printing of a document

  1. #1


    Tcs Guest

    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

  2. #2


    Reventlov Guest

    Re: Automating the printing of a document

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

    >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

Automating the printing of a document

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unwanted vertical lines when printing a Word document with an imag Hapless Vista print fax & scan 1 15 Jul 2008
Printing queue, printed document residual artifact, time to print (multiple query) Phil Vista print fax & scan 0 23 Jun 2008
Printing A Document Selected From A Drop Down List Iain Wilson .NET General 0 11 Jun 2008
Printing to XPS Document writer Sam Vista print fax & scan 1 22 Jun 2007
Re: XPS Viewer and Printing to MS XPS Document Writer Bruce Sanderson Vista General 0 07 Apr 2007