Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ORACLE TO WORD using OLE

Status
Not open for further replies.

jhoann

Programmer
Apr 18, 2002
81
PH
I want to transfer my data from Oracle to WORD, but in my WORD I have already existing data, my problem is when I transfer my data(ORACLE), the existing data in my WORD will go at the bottom of the page .

how can it be done?

For example:
(1)
template.doc - it contains :

Date : June 13, 2002

(2)
From Oracle I will transfer this to WORD :

Name : Anne
Tel no : 555-555-55

(3)
I want my output to be like this:

Date : June 13, 2002
Name : Anne
Tel no : 555-555-55

(4)
But when I transfer it, it looks like this :

Name : Anne
Tel no : 555-555-55

Date : June 13, 2002


Please help me :c



 
Jhoann:

You could use CHR(10) to start a new line. Please see the following:

***********************************************************
declare
out_file text_io.file_type;
linebuf varchar2(1000);
begin
out_file :=text_io.fopen('word_file.doc','a');
Text_IO.Putf(out_file,'Name: Wei'||chr(10));
Text_IO.Putf(out_file,'Tel:555-555-5555');
Text_IO.Fclose(out_file);
end;
***********************************************************

Hope this would help.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top