Reply
 
Thread Tools Display Modes
  #1   Report Post  
Phil
 
Posts: n/a
Default Removing blank lines from for letter

I am doing a mail merge using an excel data source, into word. Some of the
fields report a return of zero. I have managed to remove the 0 from the form
letter replacing it with a space, but it will not suppress the line, and I am
a bit stuck. Here is my code below
{IF {MERGEFIELD "Employee"}0 "{Medical}"}

Many thanks

  #2   Report Post  
Peter Jamieson
 
Posts: n/a
Default

Yes, the problem is that Word does not actually suppress any old blank line.
It only suppresses blank lines that are blank by being blank and having at
least one blank MERGEFIELD field on them, and unfortunately an { IF } with a
blank result doesn't count. If you happen to have a field in your sheet that
you know is always blank, you could probably use

{ IF { MERGEFIELD Employee } 0 "{ Medical }" "" }{ MERGEFIELD
myblankfield }

But if you don't (and who would?) you can try putting the paragraph mark
inside the result in the case where the field is non-blank, e.g.

BeforeTheBlankLine
{ IF { MERGEFIELD Employee } 0 "{ Medical }
" "" }AfterTheBlankLine

should give you

BeforeTheBlankLine
Whatever is in medical
AfterTheBlankLine

or

BeforeTheBlankLine
AfterTheBlankLine

Peter Jamieson
"Phil" wrote in message
...
I am doing a mail merge using an excel data source, into word. Some of the
fields report a return of zero. I have managed to remove the 0 from the
form
letter replacing it with a space, but it will not suppress the line, and I
am
a bit stuck. Here is my code below
{IF {MERGEFIELD "Employee"}0 "{Medical}"}

Many thanks



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
How do I skip line numbering on blank lines? MKA Page Layout 3 May 31st 05 02:05 PM
footnote insert also puts 14 unwanted blank lines in middle of my. LKB Microsoft Word Help 2 April 28th 05 04:58 PM
Where did "print blank lines" option go in Office 2003??? Emily @ Siemons Mailmerge 1 April 26th 05 06:35 PM
Change Line Count to not count blank lines Carol Microsoft Word Help 4 November 27th 04 02:46 PM
suppressing blank address lines in mail merge Geoff Holt Mailmerge 1 November 26th 04 08:16 PM


All times are GMT +1. The time now is 03:00 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"