Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-11-2014, 07:16 PM
macropod's Avatar
macropod macropod is offline Using skip record as well as if, then, else Windows 7 64bit Using skip record as well as if, then, else Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

If 0 isn't a valid result, you could code the SKIPIF field along the lines of:


{SKIPIF {MERGEFIELD Boy4}= 0}
or:
{SKIPIF «Boy4»= 0}

Otherwise, you would probably need to code the SKIPIF field along the lines of:
{SKIPIF {MERGEFIELD Boy4}<> {={MERGEFIELD Boy4}}}
or:
{SKIPIF «Boy4}<> {=«Boy4»}}

Note: The field brace pairs (i.e. '{ }') for the above example are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from this message. Nor is it practicable to add them via any of the standard Word dialogues. Likewise, you can't type or copy & paste the chevrons (i.e. '« »') - they're part of the actual mergefields, which you can insert from the mailmerge toolbar. The spaces represented in the field construction are all required.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 10-11-2014, 08:16 PM
azza azza is offline Using skip record as well as if, then, else Mac OS X Using skip record as well as if, then, else Office 2008 for Mac
Novice
Using skip record as well as if, then, else
 
Join Date: Oct 2014
Posts: 4
azza is on a distinguished road
Default

Many thanks.

I'm close now (especially thanks to your tip about the spaces being vital).

The fields are now invisible if null but there is still a carriage return when the field is null (or zero).

The code I've got is:

Code:
{SKIPIF { MERGEFIELD Boy4 }=""  }{ IF {MERGEFIELD Boy4 }<>""Boy Aged 4: {MERGEFIELD Boy4 }" "" }
Maybe I need to take the carriage returns out of the document and into the fields somehow.
Reply With Quote
  #3  
Old 10-11-2014, 08:22 PM
azza azza is offline Using skip record as well as if, then, else Mac OS X Using skip record as well as if, then, else Office 2008 for Mac
Novice
Using skip record as well as if, then, else
 
Join Date: Oct 2014
Posts: 4
azza is on a distinguished road
Default

A ha!

It seems I just need to put a carriage return in the code:
Code:
{SKIPIF { MERGEFIELD Boy4 }=""  }{ IF {MERGEFIELD Boy4 }<>""Boy Aged 4: {MERGEFIELD Boy4 }" 
"" }
Thank you again for your help!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using skip record as well as if, then, else Transpose cells and skip? ItsjustB Excel 1 01-09-2013 08:53 AM
Using skip record as well as if, then, else skip to next sentence? moreenz Word 3 08-16-2012 02:41 PM
Footer to Start on Page 1 - skip TOC SQLUSA Word 4 08-12-2012 11:36 AM
avoid duplicete record and merge the record with the existed record hemant.behere Excel 0 01-10-2012 02:53 AM
Using skip record as well as if, then, else skip duplicate letters karen h Mail Merge 10 03-23-2011 08:37 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:13 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft