Home » Developer & Programmer » Forms » open text file
open text file [message #152284] Thu, 22 December 2005 03:39 Go to next message
foreverth
Messages: 5
Registered: November 2005
Junior Member
I want to open a text file (*.doc) on Form 6i. But i don't success in writing code to do it.
Can you help me?
Re: open text file [message #152295 is a reply to message #152284] Thu, 22 December 2005 05:58 Go to previous messageGo to next message
imhamedi
Messages: 5
Registered: December 2005
Location: Rabat
Junior Member
procedure test_ecriture_fichier is
v_text_io text_io.file_type;
Chemin varchar2(40);
text_charg varchar2(200);
Begin
chemin := 'C:\mon_doc.doc';
v_text_io := text_io.fopen (chemin,'w');
text_charg := 'TEST';
text_io.put_line(v_text_io,text_charg);
text_io.fclose(v_text_io);
Exception when others then
Message(sqlerrm);
end;
hope that'll help you
icon14.gif  Re: open text file [message #152397 is a reply to message #152295] Thu, 22 December 2005 21:24 Go to previous messageGo to next message
foreverth
Messages: 5
Registered: November 2005
Junior Member
Thank for your help, imhamedi!
But i want to open a text file on Microsoft Word, like user to open a normal text file. I think your way can only input/output data text file, not open on MW. May be, we need connection...
I'm looking forward to your reply!
Re: open text file [message #152731 is a reply to message #152397] Mon, 26 December 2005 20:04 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
You said you wanted to open a text file, *.doc is normally a Word Document File. What you want to do is 'open MS Word with a particular file', not just open a text file.

Sarch this forum for 'word' or 'MS word' somebody has given a nice solution using 'ora_ffi'.

David
Re: open text file [message #152845 is a reply to message #152731] Tue, 27 December 2005 04:08 Go to previous messageGo to next message
foreverth
Messages: 5
Registered: November 2005
Junior Member
David!
You don't understand my mind. "Sarch this forum for 'word' or 'MS word' somebody has given a nice solution using 'ora_ffi'" ? hihihi
Nothing. If you use I/O file, you will only input and output data of file, OK? If you use Output file, Oracle will read data and assign some variable, OK? I don't need it. I want to call a text file *.doc on MS Word by code Oracle form 6i. Oracle will Conection to MS Word and open file.
However, thank you David!

Re: open text file [message #152846 is a reply to message #152731] Tue, 27 December 2005 04:10 Go to previous messageGo to next message
foreverth
Messages: 5
Registered: November 2005
Junior Member
David!
You don't understand my mind. "Sarch this forum for 'word' or 'MS word' somebody has given a nice solution using 'ora_ffi'" ? hihihi
Nothing. If you use I/O file, you will only input and output data of file, OK? If you use Output file, Oracle will read data and assign some variable, OK? I don't need it. I want to call a text file *.doc on MS Word by code Oracle form 6i. Oracle will Conection to MS Word and open file.
However, thank David!
Re: open text file [message #152850 is a reply to message #152845] Tue, 27 December 2005 04:33 Go to previous messageGo to next message
imhamedi
Messages: 5
Registered: December 2005
Location: Rabat
Junior Member
sorry Smile my message was destinated to another subject Smile sorry sorry sorry Smile
Re: open text file [message #152922 is a reply to message #152284] Tue, 27 December 2005 22:44 Go to previous message
ashishmate
Messages: 90
Registered: February 2005
Location: Mumbai
Member

Hi

I think you are looking for this code this will open ms word session.
 DECLARE
 	AppID  PLS_INTEGER;
 BEGIN
AppID := DDE.App_Begin('C:\Program Files\Microsoft Office\Office\WINWORD.EXE C:\phoneno.txt',DDE.App_Mode_maximized);
 END;  


Check DDE pkg For more details
Previous Topic: tooltip_text on list form
Next Topic: Oracle Forms 6i Documentation
Goto Forum:
  


Current Time: Fri Sep 20 05:27:37 CDT 2024