Home » Developer & Programmer » Forms » Word Document open from oracle form 10 g
Word Document open from oracle form 10 g [message #629668] Sun, 14 December 2014 03:41 Go to next message
irfankundi786@yahoo.com
Messages: 269
Registered: February 2009
Location: pakistan
Senior Member
How to open the word document from oracle 10g using Ole2 package. Whether i need Webutil for this or not?
Re: Word Document open from oracle form 10 g [message #629711 is a reply to message #629668] Mon, 15 December 2014 09:01 Go to previous messageGo to next message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
Forms 10g is web deployed so OLE2 will run on the application server not on the client. Therefore, you will need to configure your Application Server to use WebUtil and use the WebUtil Client_OLE package instead. If you test your form by running it from the Forms Builder, then you will need to configure your Forms Builder for WebUtil as well.

Craig...
Re: Word Document open from oracle form 10 g [message #629712 is a reply to message #629711] Mon, 15 December 2014 09:07 Go to previous messageGo to next message
irfankundi786@yahoo.com
Messages: 269
Registered: February 2009
Location: pakistan
Senior Member
if i open the word file on server using server word installed and save it on server in drive.then i need the webutil or not?
if the server is on linux then what the coding to open the word file?
or I must configure the webutil?
Re: Word Document open from oracle form 10 g [message #629714 is a reply to message #629712] Mon, 15 December 2014 09:21 Go to previous messageGo to next message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
irfankundi786@yahoo.com wrote on Mon, 15 December 2014 08:07
if i open the word file on server using server word installed and save it on server in drive.then i need the webutil or not?...

No, OLE2 will still work on the Application Server (AS) - provided your AS is Windows and you have the Office program installed.

irfankundi786@yahoo.com wrote on Mon, 15 December 2014 08:07
...
if the server is on linux then what the coding to open the word file?
or I must configure the webutil?

With a Non-Windows Application Server, you will have to use WebUtil to interact with the Client Office product.

As to the coding, there are numerous examples of how to use WebUtil on the Internet so I'll not re-list anything here. Smile

To successfully configure WebUtil, take a look at the following Forms Help Topics:
1. Configuring WebUtil
2. Runtime Setup Checklist

I recommend you print the "Runtime Setup Checklist" and then using the Configuring WebUtil article to complete each step in the checklist.

Craig...
Re: Word Document open from oracle form 10 g [message #629715 is a reply to message #629714] Mon, 15 December 2014 09:55 Go to previous messageGo to next message
irfankundi786@yahoo.com
Messages: 269
Registered: February 2009
Location: pakistan
Senior Member
Thanks for Reply.........
In the case of webutil how this code is change please i refer the example posted as
http://www.orafaq.com/forum/mv/msg/80617/233229/#msg_233229 link
please mentioned where i have to changed the code and How????
Re: Word Document open from oracle form 10 g [message #629716 is a reply to message #629715] Mon, 15 December 2014 10:15 Go to previous messageGo to next message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
I'm going to refer you to the many examples of using WebUtil with MS-Word that already exist on the Internet. There are really good demos out there that explain everything in pretty good detail.

Craig...
Re: Word Document open from oracle form 10 g [message #629749 is a reply to message #629716] Mon, 15 December 2014 20:03 Go to previous messageGo to next message
irfankundi786@yahoo.com
Messages: 269
Registered: February 2009
Location: pakistan
Senior Member
thanks Craig...\
Please give me the example ...as you mention please refer...
Re: Word Document open from oracle form 10 g [message #629841 is a reply to message #629716] Tue, 16 December 2014 08:02 Go to previous messageGo to next message
irfankundi786@yahoo.com
Messages: 269
Registered: February 2009
Location: pakistan
Senior Member
Craig please send the example as you mentioned...............
1. can we open the existing file in using ole2 and also on client both becuse ole2 always open a new document...
2. if yes then where the file should be place on client or on server?
3. how to add additional pages in existing document?
Re: Word Document open from oracle form 10 g [message #629842 is a reply to message #629841] Tue, 16 December 2014 08:27 Go to previous messageGo to next message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
Try this....
http://lmgtfy.com/?q=oracle+forms+webutil+ms-word+examples
Re: Word Document open from oracle form 10 g [message #629914 is a reply to message #629842] Wed, 17 December 2014 07:33 Go to previous messageGo to next message
irfankundi786@yahoo.com
Messages: 269
Registered: February 2009
Location: pakistan
Senior Member
sir,
my application server is on linux. i do the following step to run the form for word document but it do nothing i think hang or something....
1. open the form builder and attache webutil.pll
2. copy the block of webutil
3. copy the canvas for the webutil block these are copy from anthor form
4. put a button and past the code like

declare
arg_list client_ole2.list_type;
document client_ole2.obj_type;
documents client_ole2.obj_type;
application client_ole2.obj_type;
BEGIN
clear_record;
clear_message;
-- application := client_OLE2.CREATE_OBJ('WORD.APPLICATION');

arg_list := client_ole2.create_arglist;
documents := client_ole2.invoke_obj (application, 'documents');
client_ole2.add_arg (arg_list, 'C:\maha.DOC');
document := client_ole2.invoke_obj (documents, 'Open', arg_list);
client_ole2.destroy_arglist (arg_list);
client_ole2.RELEASE_OBJ (documents);
exception
when others then
message(SQLERRM);
message(SQLERRM);

end;

5. compile the form on linux.
6. run the form on client which is win 7
but the form do nothing
please mention which step is missued i think specially in webutil because the in form builder when other ole is used which not for webutil method the file opend and works but in webutil is not why???
Re: Word Document open from oracle form 10 g [message #629919 is a reply to message #629914] Wed, 17 December 2014 08:40 Go to previous messageGo to next message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
Have you completed the WebUtil configuration?

Please check the Java Console to see if there are any Java Exceptions being thrown. To view the Java Console, just right-click on the Java Icon in the System Tray and select Java Console. WebUtil relies on the JACOB (Java COm Bridge) to perform he OLE actions on the client so if it is not working, most likely there is a Java Exception occurring.

I strongly recommend you read the following Forms Help Topics on WebUtil:
1. Introduction to WebUtil
2. WebUtil User's Guide
3. Using WebUtil in Your Applications
4. Functions in WebUtil

Craig...
Re: Word Document open from oracle form 10 g [message #629922 is a reply to message #629919] Wed, 17 December 2014 08:52 Go to previous messageGo to next message
irfankundi786@yahoo.com
Messages: 269
Registered: February 2009
Location: pakistan
Senior Member
hi Craig.
it is confirmed that Webutil is configured because some other form is working for the image upload and download.
my server is on linux and client is on win 7.
when form is open all the steps i mention is correct?
when i compile form on linux ...webutill.pll is attached again.
where i am doing miss steps?
Re: Word Document open from oracle form 10 g [message #629982 is a reply to message #629919] Thu, 18 December 2014 07:43 Go to previous messageGo to next message
irfankundi786@yahoo.com
Messages: 269
Registered: February 2009
Location: pakistan
Senior Member
i save the word file in oracle database by using Db_to_client and open the file from database using webutil.host() method. but now i want when the file is open block text item data is write in opened word file how i can do this>
Re: Word Document open from oracle form 10 g [message #629990 is a reply to message #629982] Thu, 18 December 2014 08:25 Go to previous messageGo to next message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
You can write to the Word document using the "CLIENT_OLE2.SET_PROPERTY()" method. For example:
CLIENT_OLE2.SET_PROPERTY(selection, 'Text', :YOUR_BLOCK.Your_Item);
Re: Word Document open from oracle form 10 g [message #629992 is a reply to message #629990] Thu, 18 December 2014 08:39 Go to previous messageGo to next message
irfankundi786@yahoo.com
Messages: 269
Registered: February 2009
Location: pakistan
Senior Member
i have opened the file from client_host method now the file is opened .can i direct data write from block to word or i follow all steps as

declare
arg_list client_ole2.list_type;
document client_ole2.obj_type;
documents client_ole2.obj_type;
application client_ole2.obj_type;
BEGIN
clear_record;
clear_message;
-- application := client_OLE2.CREATE_OBJ('WORD.APPLICATION');

arg_list := client_ole2.create_arglist;
documents := client_ole2.invoke_obj (application, 'documents');
client_ole2.add_arg (arg_list, 'C:\maha.DOC');
document := client_ole2.invoke_obj (documents, 'Open', arg_list);
client_ole2.destroy_arglist (arg_list);
client_ole2.RELEASE_OBJ (documents);
exception
when others then
message(SQLERRM);
message(SQLERRM);

pleas mentioned......
Re: Word Document open from oracle form 10 g [message #630016 is a reply to message #629992] Thu, 18 December 2014 10:57 Go to previous message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
irfankundi786@yahoo.com wrote on Thu, 18 December 2014 07:39
i have opened the file from client_host method now the file is opened .can i direct data write from block to word or i follow all steps as
...

Yes, you can send output to Word from your form. I gave you the method that lets you write to word through the CLIENT_OLE2 package. I'm not going to write the code for you. You need to look at your code and decide where is the best place to add the call to the CLIENT_OLE2.SET_PROPERTY() method. (Hint: right after you destroy your argument list...)

As I have mentioned, there are plenty of examples of how to do this already published on the Internet. Take some initiative and search the Internet and read these articles.

You're on your own (YOYO) from here.

Craig...
Previous Topic: How to Shutdown oracle Database Through Forms 6i
Next Topic: Make form buider as Server problem
Goto Forum:
  


Current Time: Fri Apr 19 21:29:18 CDT 2024