Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
direynolds direynolds is offline
external usenet poster
 
Posts: 1
Default If statement and blank lines

I know this question has been posted before and I have tried multiple
solutions but they have not worked in my document. Help in solving this issue
would be appreciated.

In my document (I use Word 2002) I have the following statements:
{If {MERGEFIELD FY04} 0 "FY04: {MERGEFIELD "FY04"\ $##,###}" ""}[RETURN]
{If {MERGEFIELD FY05 0 "FY05: {MERGEFIELD "FY05"\ $##,###}" ""}[RETURN]
{If {MERGEFIELD FY06 0 "FY06 {MERGEFIELD "FY06\ $##,###}" ""}[RETURN]

I am using the three if statements to show transaction data for fiscal
years. The if statements work but I have a blank line for those years that
are 0.

I have tried nesting but was unclear on how to include the text within the
merge. Thanks

Di


  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default If statement and blank lines

Try the following construction

{If {MERGEFIELD FY04} 0 "FY04: {MERGEFIELD "FY04"\ $##,###}" {If
{MERGEFIELD FY05 0 " [RETURN]
FY05: {MERGEFIELD "FY05"\ $##,###}" {If {MERGEFIELD FY06 0 "[RETURN]
FY06 {MERGEFIELD "FY06\ $##,###}" ""}}}

--
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

"direynolds" wrote in message
...
I know this question has been posted before and I have tried multiple
solutions but they have not worked in my document. Help in solving this
issue
would be appreciated.

In my document (I use Word 2002) I have the following statements:
{If {MERGEFIELD FY04} 0 "FY04: {MERGEFIELD "FY04"\ $##,###}" ""}[RETURN]
{If {MERGEFIELD FY05 0 "FY05: {MERGEFIELD "FY05"\ $##,###}" ""}[RETURN]
{If {MERGEFIELD FY06 0 "FY06 {MERGEFIELD "FY06\ $##,###}" ""}[RETURN]

I am using the three if statements to show transaction data for fiscal
years. The if statements work but I have a blank line for those years that
are 0.

I have tried nesting but was unclear on how to include the text within the
merge. Thanks

Di




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using an If Statement Kelly Mailmerge 6 September 28th 07 07:31 PM
Mergefield with comma, suppress comma if field blank JB reluctantly from WP Mailmerge 3 November 17th 06 12:36 AM
Display text if a group of mergefields are blank [email protected] Mailmerge 1 August 11th 06 03:17 PM
Supress blank lines Jan Mailmerge 5 March 6th 06 03:52 PM
Hard returns in an If-Then-Else statement Bryan L Mailmerge 2 November 30th 05 08:29 PM


All times are GMT +1. The time now is 09:30 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"