Field Codes in mail merging

G

Guest

Dear Forum users

My question is hopefully simple and I will try and explain my problem
succinctly.

I have an Access database, which has a series of tick box fields. I want to
create a Word Mail Merge template containing a form that lists which of the
Yes / No fields are ticked.

I have exported the data source and included the merge fields using the ‘If
then Else’ Word field, e.g {IF {MergeField Benificiary Chinese} = 1,
"Chinese"," "}

This works fine except the output looks like

Beneficiary Group
Chinese


Asian

In other words the fields that have a null value still take up a space

I would like it to look like

Beneficiary Group
Chinese
Asian

Is there anyway of not showing these 'blank' fields

Thanks in anticiapation.

LW
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?TGVzX1c=?=,

By "blank space" you mean a space (like when one presses the space bar), or an
empty line (paragraph, like you show below)?

To suppress a space, remove the space you have in here: "Chinese", " "
It should look like: "Chinese", ""

To suppress a paragraph insert the IF field on the same line with the merge
field that generates Asian, below. In the merge field, position the cursor at
the end of "Chinese, just before the closing quotes. Press ENTER. This will
include the paragraph as part of the IF field, so it will only show when
"Chinese" is shown.
I have an Access database, which has a series of tick box fields. I want to
create a Word Mail Merge template containing a form that lists which of the
Yes / No fields are ticked.

I have exported the data source and included the merge fields using the ‘If
then Else’ Word field, e.g {IF {MergeField Benificiary Chinese} = 1,
"Chinese"," "}

This works fine except the output looks like

Beneficiary Group
Chinese


Asian

In other words the fields that have a null value still take up a space

I would like it to look like

Beneficiary Group
Chinese
Asian

Is there anyway of not showing these 'blank' fields

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
M

macropod

Hi Les,

To only get output when 'BenificiaryChinese = 1', change your field coding
to:
{IF{MergeField BenificiaryChinese}= 1 "Chinese"}

From the symptoms you've described, though, it looks like you may have a
carriage-return separating the mergefields (eg:
{IF{MergeField BenificiaryChinese}= 1 "Chinese"}¶
{IF{MergeField BenificiaryIndian}= 1 "Indian"}¶
{IF{MergeField BenificiaryAsian}= 1 "Asian"}

If that's the case, change your field coding to:
{IF{MergeField BenificiaryChinese}= 1 "Chinese¶"}{IF{MergeField
BenificiaryIndian}= 1 "Indian¶"}{IF{MergeField BenificiaryAsian}= 1
"Asian¶"}
so that all the mergefields are on the same *logical* line and the
carriage-returns are embedded in them as shown. You probably won't be able
to avoid having the carriage-return being output as a result of the last one
in the series, at least some of the time, so adding it to all the
mergefields will at least ensure consistency - and you could actually attach
the mergefields to the next physical paragraph so that the paragraph break
the last mergefield inserts will become part of the document's normal flow.

Cheers
 
S

Suzanne S. Barnhill

Of course, I would have to advise spelling "beneficiary" correctly.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
M

macropod

I agree, but I didn't want to confuse things by changing the OP's mergefield
name spelling.

Cheers
 
S

Suzanne S. Barnhill

I was advising the OP, not you. <g>

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
C

Cindy M -WordMVP-

Hi Suzanne,
I was advising the OP, not you. <g>
Yes, you do that a lot <frown>: Reply to someone else's
reply, rather than the OP. And not even make it obvious in
your message that the reply is directed to the OP and not
the person to whom you're replying. Personally, when you do
it to me, I find it... distracting (even downright
irritating), because it takes time and energy to evaluate
to whom it's directed.

If you can't use a "proper" newsreader so that you see the
entire thread, and can't be bothered to find the original
posting in the software you do use, could at least give an
indication as to whom the reply is addressed and apologize
for not having the original message available? Then those
of us whose messages you're "hijacking" could dismiss it at
a glance and get on with our work.

Otherwise, I will soon end up not reading anything you
post, at all :)

Cindy Meister
 
S

Suzanne S. Barnhill

Well, in this case I plead innocent. I was "advising" the OP, but I was
replying to Bob (he seemed more likely to appreciate the comment than the
OP).

As for replying to your (and others') posts, I do this for two reasons:

1. When what I have to say is clearly an addition to what a poster has
already said, it makes sense for the OP to read it as such. In some cases it
is also a modification or clarification of a reply. A post in parallel,
repeating the same information in order to add to it, seems to me to imply
that I have not read the other replies.

2. I have found that, especially when using the Web portal, posters often
never see additional replies to their original post; they tend to keep
reading in the first thread.

It is true, however, that, since I read NGs with read messages hidden, it is
often, especially in a very active NG such as this one, very difficult to
find the original (or any previous read) post and reply to it.

In future, however, I will assume that your posts in a thread are the final
word on a subject and leave them alone. They're usually impossible to make
much sense of, anyway, because you snip so aggressively.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top