View Single Post
  #11   Report Post  
Nuno Santos Nuno Santos is offline
Junior Member
 
Posts: 3
Default

Quote:
Originally Posted by Doug Robbins - Word MVP View Post
In that case you need to use an If...then...Else field construction as
follows

{ MERGEFIELD City }¶
{ IF { MERGEFIELD County } "" "{ MERGEFIELD County }¶
{ MERGEFIELD PostCode }" "{ MERGEFIELD PostCode }" }¶

In the above, you must use Ctrl+F9 to insert each pair of field delimiters
{ } and you need to press the Enter key where the ¶ symbol is shown.

You can start by inserting the mergefields as follows

City ¶
County "" " County¶
PostCode" "PostCode" ¶

then use Alt+F9 to toggle on the display of the field codes and you will see

{ MERGEFIELD City }¶
{ MERGEFIELD County } "" "{ MERGEFIELD County }¶
{ MERGEFIELD PostCode }" "{ MERGEFIELD PostCode }" ¶

Then select the second and third lines, excluding the final paragraph mark
and press Ctrl+F9 which will then enclose those fields inside another pair
of field delimiters and then you just need to enter the IF in the position
shown.

Not the there are spaces either side of the and between the "" " in the
second line and between the " " in the third line.
--
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, originally posted via msnews.microsoft.com
"Lester Lane" wrote in message
...
On 30 June, 08:34, "Doug Robbins - Word MVP"
wrote:
Use the SkipIf field to test if an appropriate mergefield is blank. If it
is, that record will be skipped.

--
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, originally posted via
msnews.microsoft.com"Kathleen" wrote
in message

...

I am using Word 2003. I have my merged document and data fields. Some
data
fields are empty and I do not wish to print those records when the
fields
are
empty. How can I do that?


I too have this issue. I don't think the above has answered this. I
don't want to go to the next record, I want the data field to be
skipped or not printed. Eg a London address does not have a County so
the postcode should be "pulled up" to appear under London. I don't
want the next address! Am I right Kathleen?

Hello, sorry for dig this old post, but i'm came across this solution that is excelent, but i have one question: if i use this solution, how can i view all fields, even the ones that have no data? I'm trying to fix one of the fields because of the text to show before the value, and i can't seem to find it. Do I have to seach for a filed which have a value for that field?

I'm using Word 2010.

thanks

Last edited by Nuno Santos : May 15th 12 at 02:14 PM