View Single Post
  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Steve
 
Posts: n/a
Default merge instructions from text file

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

-----------------------------------------------------

"Graham Mayor" wrote:

Your further response creates more questions than answers I'm afraid.

Am I to take it that document1.doc is a merge document containing fields
represented in data.txt, and that data.txt will contain a single record and
that custdir will change according to the customer? Thus you are intending
to run a lot of individual merges?

No guarantees that it will take us any farther, but can you tell us a lot
more about what you are doing and the documents involved.


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Steve wrote:
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]

Steve



"Graham Mayor" wrote:

What 'instructions' do you propose adding to the text file that would
trigger the need to re-merge? Is this text file the data file?
A word merge will write all its output to a single file - you could
split that file later into separate documents, but it would always
start as a single file. Whether what you propose is doable or not
depends on exactly what it is you are proposing and you have
provided insufficient information about the project to form an
opinion.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Steve wrote:
This is an interesting assignment:

I need to feed information to Word 2000 telling it to merge given
files with given data, producing given output. I figure I would
append instructions to a text file, then have a Word macro
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?