Nabil,
According to Adobe’s web site, neither Reader nor Acrobat support command
line parameters:
“Other Acrobat applications, including Acrobat, Catalog, PDFWriter, and
Reader, are not designed to be run from a command line. Therefore, Adobe does
not support running Acrobat applications other than Distiller from a command
line.â€
(See
http://www.adobe.com/support/techdocs/321090.html )
A solution is to use PrintPDF.exe that comes as part of PDFEdit995 (See
www.pdf995.com ) (No, folks, I don’t work for them, I just think their
products help me solve problems.) Program is free to download and use, but
shows sponsor adds. $9.95 sent to them removes the sponsor adds.
You would use the SHELL command to pass the path to the program, followed by
a space, followed by the path to the pdf document:
RetVal = SHELL(“C:\Program Files\pdf995\res\utilities\PrintPDF.exe
C:\Temp\PDFDocToPrint.pdfâ€, 1)
Note that SHELL operates asyncrosly, meaning that your code continues to run
after you call SHELL. You may need to add a Sleep command immediately
afterward to wait for the document to print.
HTH,
Bruce