Open PDF Document in Navision

I need oped pdf document from Navision Financials. Anybody can help me.

Hi One of the possibilities is to open the PDF-file using the hyperlink command: HYPERLINK(‘c:\noname.pdf’); If you have both your Intenet browser(e.g. MS Internet Explorer) and Acrobat Reader properly installed on your system, the PDF file will be opened by using the above command. Regards Andreas L.

Hi again It of course requires a developer lincense to use this in your code. Regards Andreas L.

Has anyone successfully created an automation routine to launch Acrobat Reader and open the PDF file? I’ve done similar things with Office, such as create a new e-mail message in Outlook and copy fields to the e-mail, but I have not had any luck with Acrobat.

Hi If you’re using the pdf.ocx shipped along with the Acrobat Reader, it’s only supposed to be used from within a browser. It’s not a fully functioning ocx. And it is not possible to make a perfect load using it from within Navision. But the HYPERLINK and SHELL commands should work without any problems. The HYPERLINK is the best one, in my opinion. Why do you need the automation solution? Are you planning on opening remote PDF files(e.g. through the Internet)? Regards Andreas L.

It isn’t knwon commonly that the Acrobat reader has a few commandline switches that might come in handy now and then. For example: (vars: Mode = Integer sFilename = text 200 sPrinterName = text 200 ReturnValue = Integer ) Example code: Mode := 2; //Notice the mandatory double quotes (") around the names! sFilename := ‘""’; sPrintername := ‘“YOUR PRINTERNAME”’; CASE Mode OF //Start Acrobat without file 0: ReturnVal := SHELL('c:\Program Files\AcroRd32.exe '); //Show file 1: ReturnVal := SHELL('c:\Program Files\AcroRd32.exe ’ + sFilename); //Print file with Printer Dialog 2: ReturnVal := SHELL('c:\Program Files\AcroRd32.exe /p ’ + sFilename); //Print file to sPrinterName without dialog 3: ReturnVal := SHELL('c:\Program Files\AcroRd32.exe /t ’ + sFilename + sPrintername); END; Of course you should check if the Acrobat Reader is installed at the standard location. John