Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
mdicke mdicke is offline
external usenet poster
 
Posts: 3
Default How to hide a merge field

I would like to hide a field in a merge, but only if it's =0 in my Excel
spreadsheet. Otherwise, I would like the filed to show up as it normally
would. An IF statement with " " (quotes around a blank) doesn't seem to be
cutting it. Any suggestions? (Couldn't find anything on a couple of the MVP
sites referenced throughout this board.)
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default How to hide a merge field

You can use a formatting switch on a numeric field
eg
{Mergefield Fieldname \# "0.00";
This is covered on my web site at
http://www.gmayor.com/formatting_word_fields.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



mdicke wrote:
I would like to hide a field in a merge, but only if it's =0 in my
Excel spreadsheet. Otherwise, I would like the filed to show up as
it normally would. An IF statement with " " (quotes around a blank)
doesn't seem to be cutting it. Any suggestions? (Couldn't find
anything on a couple of the MVP sites referenced throughout this
board.)



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
mdicke mdicke is offline
external usenet poster
 
Posts: 3
Default How to hide a merge field

Your suggestion of {Mergefield Fieldname \# "0.00";;} didn't work. And I
didn't see anything on your site that really showed what I was looking for.

Here's my field as it currently stands, and works returning me the correct
data:

{ MERGEFIELD O_08 \# $##.00 }

What I'd like to do (or think I need to do) is something like this:

{ IF { MERGEFIELD O_08 = 0 "" { MERGEFIELD O_08 \# $##.00 } }

or mabye just:

{ IF { MERGEFIELD O_08 = 0 "" \# $##.00 }

Whatever the case, I can't get the filed blank if there's a zero in that cell.

Thanks.
Matt

"Graham Mayor" wrote:

You can use a formatting switch on a numeric field
eg
{Mergefield Fieldname \# "0.00";
This is covered on my web site at
http://www.gmayor.com/formatting_word_fields.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



mdicke wrote:
I would like to hide a field in a merge, but only if it's =0 in my
Excel spreadsheet. Otherwise, I would like the filed to show up as
it normally would. An IF statement with " " (quotes around a blank)
doesn't seem to be cutting it. Any suggestions? (Couldn't find
anything on a couple of the MVP sites referenced throughout this
board.)




  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default How to hide a merge field

OK

{ IF { MERGEFIELD O_08 } 0 { MERGEFIELD O_08 \# "$,0.00"} }

If you want zeros suppressing also, add in the semi-colons to the switch
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


mdicke wrote:
Your suggestion of {Mergefield Fieldname \# "0.00";;} didn't work.
And I didn't see anything on your site that really showed what I was
looking for.

Here's my field as it currently stands, and works returning me the
correct data:

{ MERGEFIELD O_08 \# $##.00 }

What I'd like to do (or think I need to do) is something like this:

{ IF { MERGEFIELD O_08 = 0 "" { MERGEFIELD O_08 \# $##.00 } }

or mabye just:

{ IF { MERGEFIELD O_08 = 0 "" \# $##.00 }

Whatever the case, I can't get the filed blank if there's a zero in
that cell.

Thanks.
Matt

"Graham Mayor" wrote:

You can use a formatting switch on a numeric field
eg
{Mergefield Fieldname \# "0.00";
This is covered on my web site at
http://www.gmayor.com/formatting_word_fields.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



mdicke wrote:
I would like to hide a field in a merge, but only if it's =0 in my
Excel spreadsheet. Otherwise, I would like the filed to show up as
it normally would. An IF statement with " " (quotes around a blank)
doesn't seem to be cutting it. Any suggestions? (Couldn't find
anything on a couple of the MVP sites referenced throughout this
board.)



  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
mdicke mdicke is offline
external usenet poster
 
Posts: 3
Default How to hide a merge field

PERFECT! Thank you!

"Graham Mayor" wrote:

OK

{ IF { MERGEFIELD O_08 } 0 { MERGEFIELD O_08 \# "$,0.00"} }

If you want zeros suppressing also, add in the semi-colons to the switch
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


mdicke wrote:
Your suggestion of {Mergefield Fieldname \# "0.00";;} didn't work.
And I didn't see anything on your site that really showed what I was
looking for.

Here's my field as it currently stands, and works returning me the
correct data:

{ MERGEFIELD O_08 \# $##.00 }

What I'd like to do (or think I need to do) is something like this:

{ IF { MERGEFIELD O_08 = 0 "" { MERGEFIELD O_08 \# $##.00 } }

or mabye just:

{ IF { MERGEFIELD O_08 = 0 "" \# $##.00 }

Whatever the case, I can't get the filed blank if there's a zero in
that cell.

Thanks.
Matt

"Graham Mayor" wrote:

You can use a formatting switch on a numeric field
eg
{Mergefield Fieldname \# "0.00";
This is covered on my web site at
http://www.gmayor.com/formatting_word_fields.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



mdicke wrote:
I would like to hide a field in a merge, but only if it's =0 in my
Excel spreadsheet. Otherwise, I would like the filed to show up as
it normally would. An IF statement with " " (quotes around a blank)
doesn't seem to be cutting it. Any suggestions? (Couldn't find
anything on a couple of the MVP sites referenced throughout this
board.)




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 to hide XE field Jan Kratochvil Microsoft Word Help 4 May 10th 23 08:50 PM
HIDE To AND Cc FIELD IN A MAIL Lohitha Nair Microsoft Word Help 2 May 22nd 08 03:31 AM
Hide Merge Field Code In Printed Document LAWNMOWERMAN Microsoft Word Help 4 April 3rd 07 04:33 PM
TOC field codes will not hide when commanded by HIDE/SHOW tile. RECONSMITH Microsoft Word Help 1 February 22nd 07 09:24 PM
HOW TO HIDE Field Codes automatically? sorazal Mailmerge 2 February 1st 05 10:33 PM


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