Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / June 2005

Tip: Looking for answers? Try searching our database.

Removing blank lines from for letter

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Phil - 21 Jun 2005 14:11 GMT
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
Peter Jamieson - 21 Jun 2005 17:52 GMT
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
>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
[quoted text clipped - 5 lines]
>
> Many thanks

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.