I have a local folder that gets PDF files and depending on their file names I need to have them printed to a specific printer.
Example:
c:\print\pr1.pdf -> printer_1
c:\print\pr2.pdf -> printer_2
c:\print\pr3.pdf -> printer_3
ShellExecute leaves Acrobat open after printing:
Same problem with Run command:
Example:
c:\print\pr1.pdf -> printer_1
c:\print\pr2.pdf -> printer_2
c:\print\pr3.pdf -> printer_3
ShellExecute leaves Acrobat open after printing:
Code:
lcFile = 'c:\print\pr1.pdf'
lcPrinter = 'printer_1'
DECLARE Integer ShellExecute ;
IN shell32.dll ;
Integer hwndParent, ;
String cVerb, ;
String cFilename, ;
String cParameters, ;
String cDirectory, ;
Integer nCmdShow
ShellExecute( _SCREEN.HWnd , [printto] , lcFile , ["] + lcPrinter + ["] , [] , 0 )
CLEAR DLLS [ShellExecute]
Same problem with Run command:
Code:
RUN /N C:\Program Files (x86)\Adobe\Acrobat DC\Acrobat\Acrobat.exe /t "c:\print\pr1.pdf" "printer_1"