This discussion is archived
14 Replies Latest reply: Dec 3, 2013 1:59 AM by Vijetha RSS

how do i standardize the path of Adobe to open a PDF file?

Vijetha Explorer
Currently Being Moderated

Hi all,

In one of my forms, i have created a Text Item (named as PDF1 ) in which i will display the name of PDF file and also have created a check box (named as CH1 & put in the block 'PDFCHK' ).

Here what i am doing is when i click on the check box, the PDF file opens (name present in the Text Item).

So i have written the following code.

DECLARE

  filename VARCHAR2(256);

  APPID PLS_INTEGER;

BEGIN

  IF :pdfchk.CH1 = 1 THEN

  filename :='C:\'||:PDF1||'.pdf';

  AppID := DDE.App_Begin('C:\Program Files\Adobe\Reader 11.0\Reader\AcroRd32.exe '||filename,DDE.APP_MODE_MAXIMIZED);

END IF;

END;

The problem here is that since i have hardcoded the path of Adobe (C:\Program Files\Adobe\Reader 11.0\Reader\AcroRd32.exe) , there is a problem.

In all the systems different versions of Adobe is installed & in different folder. So it does not work on all systems. So how do i standardize the code such that it searches the path itself or what can be the remedy to this???

Please help me on this?

Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

Thank You.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points