I have been trying to find a way to asign a mail merge data source to word document and execute merge command using Oracle Form 10g\ pl\sql. So far the only way I have found is extracting a data into a CSV file from DB and then pointing word to the file as a data source but I would like to point it to the Oracle table or even better a SQL statement. Could anyone let me know if this is possible and some sample code would be great.
there is no provision for directly using the oracle table of sql statement into the mail merge except ODBC connectivity if you have.
otherwise you can use the OLE package and invoke the mailmerge method of the word application.
you have to execute the oracle statement and process that through pl/sql and supply necessary data result set to the mail merge method while invoking that.