Word files are binary format and are not changeable by this technique: the characters are positionally important in the document structure and any changes in length will screw the doc completely..
You can go for a number of approaches at various levels of technicality, but the simplest is just to save the document as Rich Text Format into a Type 19 file, and you can then easily do a CHANGE() function replace on the contents. I can't remember exactly, but mail merge fields are identified by a fairly obvious prefix, something like "\MERGEFIELD name". It's worth reading up a little about RTF format (the format is published and publically available on the web) before you do so you know some of the escape characters when replacing.
Brian Leach
On Wed, 3 Mar 2004 16:09:29 -0500 [EMAIL PROTECTED] wrote:
I am running UV 9.5.1... on windows NT (PICK flavor).
I want to be able to read in a .doc file created in Word 2000, do a string
replace, and then write out the file as a new .doc file. I have tried
using the standard READ and READSEQ. I use the CHANGE command [REC =
CHANGE(REC,txta,txtb)] and then WRITE (or WRITESEQ). In each case I get
the anticipated results but when I attempt to launch the document in Word
2000 I get THE "unknown file format" error. I have to figure that some
characters imbedded in the original document are being stripped by the
limitations of the uniVerse READ and READSEQ commands thus making this
method not practical. I did this in the past - in another life maybe - but
this is my first attempt with WORD 2000. All practical suggestions
appreciated.
dan
Note: Effective February 2, 2004, Arnold & Porter became a limited
liability partnership with the name Arnold & Porter LLP. Please
change your records accordingly. The addresses, telephone and fax
numbers, and e-mail addresses of the firm and attorneys have not changed.
----------------------------------------------------------------------
This communication may contain information that is legally privileged,
confidential or exempt from disclosure. If you are not the intended
recipient, please note that any dissemination, distribution, or copying
of this communication is strictly prohibited. Anyone who receives this
message in error should notify the sender immediately by telephone or
by return e-mail and delete it from his or her computer.
----------------------------------------------------------------------
Daniel Plocinik [EMAIL PROTECTED]
Arnold & Porter LLP Telephone: 202-274-7639
555 Twelfth Street, NW Fax: 202-942-5999
Washington, DC 20004-1202
For more information about Arnold & Porter LLP, click here:
http://www.arnoldporter.com
-- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
________________________________________________________________________
This email was checked by MessageLabs SkyScan before entering Microgen.
________________________________________________________________________ This email was checked on leaving Microgen for viruses, similar malicious code and inappropriate content by MessageLabs SkyScan.
DISCLAIMER
This email and any attachments are confidential and may also be privileged.
If you are not the named recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information.
In the event of any technical difficulty with this email, please contact the sender or [EMAIL PROTECTED]
Microgen Information Management Solutions http://www.microgen.co.uk -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users