Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Aug 2013
    Posts
    45
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Needs some modification

    Hello,

    This script is from forum member Zeddy, Print External PDF Files from Excel Sheet, http://windowssecrets.com/forums/sho...om-Excel-Sheet

    I need to have a small change to it,
    The print out of the files are from cell value of column A to a single printer, Now i have decided to print parallel from Column B also to
    another attached printer.

    Will some help me to modify the codes so i can print on 2 printers consecutively one from Column A to printer HP LaserJet Professional M1213nf MFP and from Column B to printer HP LaserJet P1106

    Code:
    Sub PrintPDFFiles()
    zProg = "C:\Program Files\Adobe\Reader 11.0\Reader\AcroRd32.exe"
    zLastRow = [a65536].End(xlUp).Row
    temp = "a1:a" & zLastRow
    zPrinter = "HP LaserJet Professional M1213nf MFP "
    For Each cell In Range(temp)
    zFile = cell.Value
    If zFile Like "*.pdf" Then
    Shell """" & zProg & """/n /t """ & zFile & """"
    End If
    Next
    End Sub

  2. #2
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,815
    Thanks
    132
    Thanked 480 Times in 457 Posts
    Hi foncesa

    ..I'll post a reply after giving others a chance to contribute.

    zeddy

  3. #3
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,815
    Thanks
    132
    Thanked 480 Times in 457 Posts
    Hi foncesa

    seems that printing pdf files doesn't grab the attention you require.

    Well, I like to keep things simple if possible, with the minimum amount of work.
    So I have attached another file [rz6-print-pdf-files.xlsm].
    This is exactly the same as file [rz5-print-pdf-files.xlsm] posted previously.

    Use one file for one printer queue and one set of pdf files to be printed.
    Use the other file for a second printer queue, with the second printer selected, and a second set of files to be printed.
    Load them together, and run at the same time.

    (If you have a third printer available, do a similar thing with another copy of the workbook)

    You could rename these files as
    PrintPdfToPrinter1.xlsm
    PrintPdfToPrinter2.xlsm
    or..
    PrintPdfToLaserJetProfessionalM1213.xlsm
    PrintPdfToHPLaserJetP1106.xlsm

    I think this keeps thing nice and simple, with something that works already, doesn't jam the printers etc etc.

    zeddy
    Attached Files Attached Files

  4. #4
    Lounger
    Join Date
    Aug 2013
    Posts
    45
    Thanks
    11
    Thanked 0 Times in 0 Posts
    Hi Zeddy,
    I tried with opening two worbooks but if i select first one it does not allow the second one to do any job it strucks to the first one. I have a lot of printing from each column this are receipts, reports, etc. about 800 pages which are printed on daily basis and i want to split them to 2 printers. If you can suggest something which can ease my work.
    Thanks in advance.

  5. #5
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,815
    Thanks
    132
    Thanked 480 Times in 457 Posts
    Hi foncesa

    OK, assuming you can't use a second available computer, what about running them in two sessions of Excel on the same computer (rather than as two files in one Excel session on the same computer).

    Open the first workbook and run as normal.
    Then start a new session of Excel by selecting Start>Programs>Excel.
    Then load the second file in this new session, and run it there.
    Try that first.

    zeddy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •