caldernet
asked on
Open a WORD document from Oracle Forms
How do I open an existing document (WORD .doc, Excel .xls, PDF etc.) from Oracle Forms 10g?
I want to be able to open a document sitting in a folder somewhere on the netword when I click a button in Oracle Forms 10g.
To make this simple, I'll assume this is a WORD document and the location of WINWORD.EXE and the document I want to open will be hard-coded.
The attached snippet shows code I obtained elsewhere which I put into a trigger on a button on my form. I readelsewhere that 10g, being web-based may require an additional API like webutil or something, but I cannot find anything clear to me.
When run in my form, it gives the following error:
FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-106561
I want to be able to open a document sitting in a folder somewhere on the netword when I click a button in Oracle Forms 10g.
To make this simple, I'll assume this is a WORD document and the location of WINWORD.EXE and the document I want to open will be hard-coded.
The attached snippet shows code I obtained elsewhere which I put into a trigger on a button on my form. I readelsewhere that 10g, being web-based may require an additional API like webutil or something, but I cannot find anything clear to me.
When run in my form, it gives the following error:
FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-106561
declare
AppID PLS_INTEGER;
begin
AppID := DDE.App_Begin('C:\Program Files\Microsoft Office\Office11\WINWORD.EXE c:\files\oui.pdf',DDE.APP_MODE_NORMAL);
end;
ASKER
Both of the following lines in my snippet caused the same error as the original.
AppID := DDE.App_Begin('C:\Program Files\Microsoft Office\Office11\WINWORD.EX E' || 'c:\temp\document.doc',DDE .APP_MODE_ NORMAL);
AppID := DDE.App_Begin('C:\Program Files\Microsoft Office\Office11\WINWORD.EX E || c:\temp\document.doc',DDE. APP_MODE_N ORMAL);
Note: In my original message, I try to open a PDF document with WINWORD. That was in error. Opening a WORD document causes the same problem. Sorry for any confusion.
AppID := DDE.App_Begin('C:\Program Files\Microsoft Office\Office11\WINWORD.EX
AppID := DDE.App_Begin('C:\Program Files\Microsoft Office\Office11\WINWORD.EX
Note: In my original message, I try to open a PDF document with WINWORD. That was in error. Opening a WORD document causes the same problem. Sorry for any confusion.
Sorry, to clarify:
AppID := DDE.App_Begin('C:\Program Files\Microsoft Office\Office11\WINWORD.EX E' || c:\temp\document.doc, DDE.APP_MODE_NORMAL);
AppID := DDE.App_Begin('C:\Program Files\Microsoft Office\Office11\WINWORD.EX
ASKER
I'm sorry - But generated the form gives the following error:
Compiling WHEN-BUTTON-PRESSED trigger on BUTTON_VIEW_DOCUMENT item in CONTROL data block...
Compilation error on WHEN-BUTTON-PRESSED trigger on BUTTON_VIEW_DOCUMENT item in CONTROL data block:
PL/SQL ERROR 103 at line 5, column 85
Encountered the symbol ":" when expecting one of the following:
. ( ) , * @ % & | = - + < / > at in is mod remainder not rem
=> .. <an exponent (**)> <> or != or ~= >= <= <> and or like
as between from using || member SUBMULTISET_
Compiling WHEN-BUTTON-PRESSED trigger on BUTTON_VIEW_DOCUMENT item in CONTROL data block...
Compilation error on WHEN-BUTTON-PRESSED trigger on BUTTON_VIEW_DOCUMENT item in CONTROL data block:
PL/SQL ERROR 103 at line 5, column 85
Encountered the symbol ":" when expecting one of the following:
. ( ) , * @ % & | = - + < / > at in is mod remainder not rem
=> .. <an exponent (**)> <> or != or ~= >= <= <> and or like
as between from using || member SUBMULTISET_
ASKER
I read that in 10g, we have to use WEBUTIL rather than APP_BEGIN.
If anybody knows how to use it, please speak up.
If anybody knows how to use it, please speak up.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
WINWORD.EXE '||file