Hi Keith,
That's certainly possible, but it's not a trivial exercise. And, rather than having it interactive, you might find it best to add one or more columns to your datafile to indicate which variants to use. You can then use an IF test in the mailmerge main document to vary the output. A field for the IF tests might be coded along the lines of:
{IF«Var1»= "A" "Text for variant A"}
{IF«Var1»= "B" "Text for variant B"}
{IF«Var1»= "C" "Text for variant C"}
{IF«Var1»= "" "Default Text"}
where 'Var1' is the name of the variables mergefield.
Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste them from this message. Likewise, you can't type or copy & paste the chevrons (ie '« »') - they're part of the actual mergefields, which you can insert from the mailmerge toolbar. Also, the IF tests don't all have to go on separate lines - I just laid them out that way for clarity.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|