> I am using Office 2000.
You only get to run macros /during/ the merge in Word 2002, which uses
'mailmerge events' to let you do this.
So your options are:
a. use IF fields to substitute pieces of text for the values in your data
source
b. control the merge from a macro, output to a document, and postprocess
the results
c. control the merge from a macro, doing one merge per record in the data
source, and stuff in whatever you want based on the values of the fields in
the mailmerge.datasource.datafields collection.
From what you say, it sounds as if (a) would be enough, e.g.
{ IF { MERGEFIELD Customer_Agmt } = 1 "Customer Agreement" "some other text
of fields or blank" }
etc. You can also nest IF fields (but there is a limit of around 20 to the
levels of nesting permitted).
Is that enough for your requirement?
--
Peter Jamieson
MS Word MVP
> Hello,
>
[quoted text clipped - 11 lines]
>
> I am using Office 2000.
Imnotabum - 08 Oct 2003 20:52 GMT
"Is that enough for your requirement?"
Yes, thank you for your kind response.
> > I am using Office 2000.
>
[quoted text clipped - 39 lines]
> >
> > I am using Office 2000.