Ok, yes I was trying to keep the question simple. I need to build a
"contiinuous merge process" that runs 24x7 on a server. Using a database
application, individuals will perform data-entry on their own client
computers. Web users will also submit data. Once a client has completed
data-entry, the database application will create one delimited ASCII data.txt
containing results of the data-entry and place it a customer folder, for
example c:\customerA\data.txt. Each customer has a unique folder name.
The database application will then need to merge somewhere between one and a
dozen documents with the data.txt merge file. For example, DocumentA.doc,
DocumentB.doc, DocumentC.doc. Each will merge with the c:\customerA\data.txt.
The above would require three merge runs, each writing an individual
document in RTF format, written to the customerA folder. So, in this senerio,
the "instruction file" would contain three records as I have described
earlier.
---- I have just discovered that MS Word 2000 allows a maximum of 255 merge
fields in a data source. That may render this question moot. My merge file
has over 700 fields. -----
Steve
-----------------------------------------------------
> Your further response creates more questions than answers I'm afraid.
>
[quoted text clipped - 47 lines]
> >>>
> >>> I'm not a VB programmer, does this look doable?
Hi Steve,
This doesn't sound like a mailmerge at all, at least not in the sense that
Word uses the term. Having said that, and depending on what's in your source
file and where it does in the target file, that may necessitate the use of a
mailmerge approach.
What you're describing is, superficially at least, a linked document. In
this case, your c:\templatedir\document1.doc is the target and
c:\custdir\data.txt is the source. Linking would work well if your source
document contains a text string or a list that needs to be inserted as a job
lot into one location in the target document. If you create one of your
source files, and a 'test' file for use as a target document, use Word's
Insert|File tools from the menu to insert the text file as a link. This will
import the contents of the text file into your Word document. Next, change
the source file then press F9 in Word, and you'll see that the Word document
updates to reflect the changes. See INCLUDETEXT in Word's Help file for
more info. If you want to save the file to rtf, with the link 'locked' to
prevent further changes, simply select ihe inserted material and press
Ctrl-Shift-F9 before saving. This process would be quite easy to automate.
However, if your source file has fields that need to be inserted into
different places in your target document, a mailmerge approach would
probably work better. In that case, you'd need your text files to have a
consistent, delimited structure; otherwise you wouldn't be able to control
which fields went where in the Word document. If, for example, some fields
are sometimes empty, the empty fields would still have to be included in the
text file - you couldn't simply leave them out and expect Word to work out
what's happened. provided you do that, this process would also be quite easy
to automate.
Cheers
> Ok, yes I was trying to keep the question simple. I need to build a
> "contiinuous merge process" that runs 24x7 on a server. Using a database
[quoted text clipped - 33 lines]
> > > The text file example provided IS the instruction. Each record
> > > contains three filenames. For example, the first record:
c:\templatedir\document1.doc,c:\custdir\data.txt,c:\custdir\output1.rtf
> > > says merge [data.txt] with [document1.doc] and write [output1.rtf]
> > >
[quoted text clipped - 24 lines]
> > >>> periodically look at the text file, and, if instructions were found,
> > >>> perform a merge. The text file would look something like this:
c:\templatedir\document1.doc,c:\custdir\data.txt,c:\custdir\output1.rtf
c:\templatedir\document2.doc,c:\custdir\data.txt,c:\custdir\output2.rtf
> > >>> So, the macro would merge document1.doc with data.txt and write
> > >>> output1.rtf, and continue to the next record, etc.
> > >>>
> > >>> I'm not a VB programmer, does this look doable?
Steve - 25 Nov 2005 21:55 GMT
Thanks, but I have to merge in hundreds of pieces of text and variables, so a
merege is required. Also, I find out that Word only allows 255 fields in a
merge data source (at least that was where it cut off when I tried to merge
my 500+ field data source). So I can't use Word at all for this process. I
have to use Word Perfect which has no such limits).
Steve
----------------
> Hi Steve,
>
[quoted text clipped - 114 lines]
> > > >>>
> > > >>> I'm not a VB programmer, does this look doable?
macropod - 26 Nov 2005 01:41 GMT
500+ fields per customer?
> Thanks, but I have to merge in hundreds of pieces of text and variables, so a
> merege is required. Also, I find out that Word only allows 255 fields in a
[quoted text clipped - 123 lines]
> > > > >>>
> > > > >>> I'm not a VB programmer, does this look doable?
Steve - 26 Nov 2005 03:31 GMT
Yes, although I suppose its possible to break the one file into several
smaller data source files. They are legal documents and the bulk of the
fields contain names, addresses, relationships of persons named in the
document. I could probably normalize this a bit. I still am suprised Word
limits the data source to 255; I expect that is because it holds the values
in an array so it can show the "merged" documents directly in the Main
Document prior to performing the actual merge process to a final document.
> 500+ fields per customer?