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

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;

Open in new window

LVL 1
caldernetAsked:
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.

DavidSenior Oracle Database AdministratorCommented:
Concatenate the executable and the file:
WINWORD.EXE '||file  
0
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.
0
DavidSenior Oracle Database AdministratorCommented:
Sorry, to clarify:
AppID := DDE.App_Begin('C:\Program Files\Microsoft Office\Office11\WINWORD.EXE' || c:\temp\document.doc, DDE.APP_MODE_NORMAL);
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

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_
0
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.
0
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.
http://prdownloads.sourceforge.net/jacob-project/jacob_18.zip

Software Downloads  (Look for WebUtil)
http://www.oracle.com/technology/software/index.html

FAQ  Oracle Forms 10g - WebUtil  April 2007
http://www.oracle.com/technology/products/forms/htdocs/webutil/WebUtilFAQ.htm

Oracle Forms 10g WebUtil  Production Release
http://www.oracle.com/technology/products/forms/htdocs/webutil/webutil.htm

WebUtil Familiarization Manual
http://www.oracle.com/technology/products/forms/htdocs/webutil/webutil_manual.pdf

WebUtil Configuration
http://www.oramore.com/community/viewtopic.php?f=9&t=28
0

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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.