How do I insert a carriage return in a MERGEFIELD?

T

Tanya

I have inserted the following field code{ MERGEFIELD AWARDSCH_DESC2 \b
SCHOLARSHIPS}. However I would like the MERGEFIELD TO APPEAR ON THE NEXT
LINE. E..I
SCHOLARSHIPS
MERGEFIELD AWARDSCH_DESC2

I do not want Scholarships to show up uless there is something in the
MERGEFIELD AWARDSCH_DESC, so I used teh \b switch.
 
P

Peter Jamieson

Put the SCHOLARSHIPS inside quotes, e.g.

{ MERGEFIELD AWARDSCH_DESC2 \b "SCHOLARSHIPS" }

then add a carriage return immediately before the second ", in the usual
way, so you have

{ MERGEFIELD AWARDSCH_DESC2 \b "SCHOLARSHIPS
" }
 
T

Tanya

Hi Peter,

I tried this and it does not work.

Peter Jamieson said:
Put the SCHOLARSHIPS inside quotes, e.g.

{ MERGEFIELD AWARDSCH_DESC2 \b "SCHOLARSHIPS" }

then add a carriage return immediately before the second ", in the usual
way, so you have

{ MERGEFIELD AWARDSCH_DESC2 \b "SCHOLARSHIPS
" }
 
P

Peter Jamieson

It works here, except the carriage return itself always appears.

But you can also do it using the more complicated:

{ IF "{ MERGEFIELD AWARDSCH_DESC2 }" = "" "" "SCHOLARSHIPS
{ MERGEFIELD AWARDSCH_DESC2 }" }

where all three pairs of {} are the special field codes youcan insert using
ctrl-F9
 
T

Tanya

Hi,

I am trying to go a step further. I have inserted a table to disble a
category of things AWARDSCH_DESC, AWARDGRNT_DESC, AWARDLOAN_DESC. Each one
takes up a cell in the table. With the field code, "{ IF "{ MERGEFIELD
AWARDSCH_DESC2 }" = "" "" "SCHOLARSHIPS
{ MERGEFIELD AWARDSCH_DESC2 }" }", How can I add to delete the cell if the
mergefield is null or blank?
 
G

Graham Mayor

You cannot delete cells from a table with a merge field, only the content -
however you don't delete the content, you insert it only when the condition
applies. Personally I would never test for a nul entry using this syntax. I
much prefer the alternative

{ IF { MERGEFIELD AWARDSCH_DESC2 } <> "" "SCHOLARSHIPS
{ MERGEFIELD AWARDSCH_DESC2 }"}

I suspect also that what you are trying to do is produce a list entry which
Word is not at all comfortable with. See How to use mail merge to create a
list sorted by category in Word 2002 -
http://support.microsoft.com/?kbid=294686
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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