Re: MS Word template from Oracle dbms

From: Richard Anderson <rca_at_netcom.com>
Date: 1996/11/02
Message-ID: <rcaE099t3.9Jn_at_netcom.com>#1/1


John Fenner (jfenner_at_erols.com) wrote:
: I am building an Oracle based intranet using a HP 9000 G70 server,
: running hp-ux 10.x and Oracle 7.x. The clients are Pentium PCs running
: Windows NT workstation 3.5. All user interaction with the database is
: via web access. I want to build a MS Word document based upon database
: records (think of a form letter where the database will update heading
: information).
 

: I have already build a MS Word template which uses merge fields. I
: loaded this template onto the unix server and made a link to it from a
: web page. When the user selects the link, I use MIME encoding to launch
: MS Word on the client and can display the template.
 

: Also, I use UTL_FILE available with PL/SQL 2.3 to write a tab or comma
: delimited file from the Oracle database which can server as either the
: header or data source for the template. My problem is that I can't get
: Word on the PCs to read either the header or data file from the unix
: server.
 

: Any ideas?
 

: Is anybody out there doing anything similar?
 

: Please post replies or email direct to:
 

: jfenner_at_erols.com
 

: Thanks in advance.

It's not clear whether the difficulty is that Word cannot see the data file or whether it cannot handle the format of the data file. If it's the latter, you might redo your SQL to generate an HTML file instead of a comma or tab delimited file.

Either way, when you launch Word you could include the name of the data file on the Word command line along with a /m macro_name switch which tells Word to run a macro which knows how to deal with the data. Since your server-based template is in a known location, you could code that information into the macro. The variable information, ie the name of the data file, would be supplied on the Word command line. Once Word was up with the data file loaded, there are myriad ways that your macro could deal with the data file and the template to generate the proper document.

The main setup requirement with this approach is getting the macro into the NORMAL.DOT template on your users' systems so that it will be available. It sounds like you're building a complex system and have to deal with standarization issues anyway so you probably already have a technique for updating and maintaining your users' Word environment. If not, you can see many discussions here involving use of the WordBasic Organizer or MacroCopy commands to setup your users.

Richard Anderson
rca_at_netcom.com

-- 
Received on Sat Nov 02 1996 - 00:00:00 CET

Original text of this message