Thanks Doug for the links. I had seen these earlier but this may be too
complex for the users to deal with later on (once I have done my task and
gone away at contract-end).
The source data table in Access is set up so that each row includes customer
name, address, etc. and then five sets of product, region and revenue. And I
create one letter for each row of data. So a customer with more than five
rows of data will get more than one letter.
"Doug Robbins - Word MVP" wrote:
It sounds like you may need to take a look at:
http://cornell.veplan.net/article.aspx?&a=3815
or fellow MVP, macropod's tutorial on Catalogue/Directory Mailmerges at:
http://www.wopr.com/cgi-bin/w3t/show...?Number=731107
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
"omsoft" wrote in message
...
Thanks Doug, I do have a mergefield rev outside the table.
The letter is name, address, etc. at the top followed by a three column
table where the columns are product, region and revenue in that order. I
do
not know how many rows of data this table will have but I limit it at 5
and
create a new form if 5.
So the product one is as below:
{if {mergefield rev} 0 {mergefield prod} ""}
The region also would be similar except that it would specify regn instead
of prod.
And the revenue one just says {mergefield rev}.
IN the table prior to that, I am forcibly setting revenue to 0 if it is
null
to avoid complications of checking null or empty string.
Thanks.
"Doug Robbins - Word MVP" wrote:
Do you have a { MERGEFIELD revenue } field in the document where you want
the revenue to appear (That is one outside of the If...then...Else field
construction, which only controls the insertion of the product. You need
a
similar If...then...Else field construction for the region where you want
that to appear if the revenue is not zero.
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
"omsoft" wrote in message
...
Thanks Peter, I did exactly as you mentioned, but I could not really
make
it
work. May be because my column order is product, region and revenue and
so
when I am populating product, revenue is still not populated? Does the
order
matter when evaluating condition?
"Peter Jamieson" wrote:
Something more like...
{ IF { MERGEFIELD revenue } = 0 "" "{ MERGEFIELD prod }" }
All the {} have to be the special field code brace pairs that you can
insert using ctrl-F9
Peter Jamieson
http://tips.pjmsn.me.uk
omsoft wrote:
I have a table in mail merge which is being populated by an Access
table.
It has tree columns - product, region, revenue and five rows.
I want to create a mergefield where if revenue = 0 then leave
product
and
region blank.
I have added the field as below. But it does not work. Can someone
please
tell me what I am doing wrong? Thanks much.
{IF{MERGEFIELD rev = 0 """" {MERGEFIELD prod}}}