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

AppID := DDE.App_Begin('C:\Program Files\Microsoft Office\Office11\WINWORD.EXE c:\files\oui.pdf',DDE.APP_MODE_NORMAL);

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David VanZandtOracle Database Administrator IIICommented:
Concatenate the executable and the file:
WINWORD.EXE '||file  
caldernetAuthor Commented:
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.EXE' || 'c:\temp\document.doc',DDE.APP_MODE_NORMAL);

AppID := DDE.App_Begin('C:\Program Files\Microsoft Office\Office11\WINWORD.EXE || c:\temp\document.doc',DDE.APP_MODE_NORMAL);

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.
David VanZandtOracle Database Administrator IIICommented:
Sorry, to clarify:
AppID := DDE.App_Begin('C:\Program Files\Microsoft Office\Office11\WINWORD.EXE' || c:\temp\document.doc, DDE.APP_MODE_NORMAL);
Price Your IT Services for Profit

Managed service contracts are great - when they're making you money. Yes, you’re getting paid monthly, but is it actually profitable? Learn to calculate your hourly overhead burden so you can master your IT services pricing strategy.

caldernetAuthor Commented:
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_
caldernetAuthor Commented:
I read that in 10g, we have to use  WEBUTIL rather than APP_BEGIN.

If anybody knows how to use it, please speak up.
caldernetAuthor Commented:
The following is the information I have been able to dig up.
Because installing WebUtil seems rather difficult and perhaps overkill, I am planning on using the WEB.SHOW_DOCUMENT built in function and hope that works.
As this is now out of the scope of the original question, I will be closing this issue and refunding my points.
Thank you very much to all who thought about this and especially to DVZ who contributed.

Before we will be able to open documents from Oracle Forms, WebUtil will have to be installed. Its an addon for 9.02 and above and I do not believe it is currently installed.

As 10g is a web-based application, WebUtil provides a collection of tools (Java Beans and an API) which allows the web based application to communicate with the clients computer to perform various tasks including file manipulation.

I have the following information which may or may not be all that is required in regards to the installation and set up of WebUtil.

Before WebUtil can be installed, something called the JACOB libraries also need to be installed.

Software Downloads  (Look for WebUtil)

FAQ  Oracle Forms 10g - WebUtil  April 2007

Oracle Forms 10g WebUtil  Production Release

WebUtil Familiarization Manual

WebUtil Configuration

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.