<<
Thanks for the suggestion. Unfortunately that does not work with our
documents and I know my description was not clear enough. We have legal
pleadings which uses the same multiple data fields throughout the
documents many pages, not necessarily in order. The first time the data
is pulled into the document works well, after that - the data does not
fill in. Are we are doing something wrong?
Just guessing what the problem(s) might be...
1. If you have multiple rows in your data source then things will be
easier if the sequence of the data in the document matches the sequence
in the data source. Then you can use { NEXT } fields to move to each
record in turn and have Word insert the correct data. For that to be
simple, you really need the data source to have a fairly fixed structure
(e.g. you are going to use data from record 1 /here/ and data from
record 2 /there/. Otherwise, if you have to read an arbitrary number of
records to get to the data you need, things can either be difficult or
impossible.
The problem if the two sequences do not match is that there is no {
PREVIOUS } field - once Word has "consumed" a record in the data source,
there's no going back. You can sometimes use { SET } fields to set local
"bookmarks" to the values in a particular record, and use those values
using { REF } fields later in the document. For example
{ SET localName { MERGEFIELD Name } }
{ NEXT }
The new name: { MERGEFIELD Name }
The old name: { REF localName }
Generally speaking, merge works a whole lot better if you can create the
"right" data source for the merge. However, if doing that would require
some programming to transform the data source into something more
appropriate, then there's a case for going all the way and creating the
output document programmatically, avoiding mailmerge altogether.
2. If you are "previewing" the merge in order to see what the document
looks like, and you try to move from record to record using e.g. the
forward/back buttons in the mailmerge toolbar, then all you will see is
what MailMerge would produce if you start with the first record you
select. From your description, I'd have to guess that that is not what
you need.
If neither of those things is the problem then you probably need to try
to spell out exactly what you are trying to do - e.g. what your data
source contains and what your document needs to end up containing.
Peter Jamieson
http://tips.pjmsn.me.uk