1 Reply Latest reply on Jul 11, 2009 8:03 AM by tcAtlanta

    How to print multiple documents from script using AcroRd32.exe

    tcAtlanta Level 1

      Using client side VBScript and WSH I can print a single pdf document using this code:

       

      set oWsh = CreateObject ("Wscript.Shell")

      oWsh.run "AcroRd32.exe /p " & "C:\temp\one day class.pdf",,true

      set oWsh = nothing

       

      However I can't get a second document to print.

       

      This code lets me open reader and print the frist document, but then reader doesn't clolse.  I can click on reader and close it and then the second document prints.  I can't figure out how to print two documents

       

      set oWsh = CreateObject ("Wscript.Shell")
      oWsh.run "AcroRd32.exe /p " & "C:\temp\one day class.pdf",,true
      oWsh.run "AcroRd32.exe /p " & "C:\temp\71448-199.PDF",,true
      set oWsh = nothing