[Last Call] Learn how to a build a cloud-first strategyRegister Now


Open a WORD document from Oracle Forms

Posted on 2008-11-20
Medium Priority
Last Modified: 2013-12-19
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

Question by:caldernet
  • 4
  • 2
LVL 23

Expert Comment

ID: 23003583
Concatenate the executable and the file:
WINWORD.EXE '||file  

Author Comment

ID: 23003697
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.
LVL 23

Expert Comment

ID: 23003945
Sorry, to clarify:
AppID := DDE.App_Begin('C:\Program Files\Microsoft Office\Office11\WINWORD.EXE' || c:\temp\document.doc, DDE.APP_MODE_NORMAL);
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  


Author Comment

ID: 23004170
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_

Author Comment

ID: 23004682
I read that in 10g, we have to use  WEBUTIL rather than APP_BEGIN.

If anybody knows how to use it, please speak up.

Accepted Solution

caldernet earned 0 total points
ID: 23006464
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

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
This video shows how to recover a database from a user managed backup
Suggested Courses

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question