A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Mergefield suppress if data field blank



 
 
Thread Tools Display Modes
  #11  
Old February 22nd, 2009, 10:12 PM posted to microsoft.public.word.mailmerge.fields
NJT
external usenet poster
 
Posts: 4
Default Mergefield suppress if data field blank

I have a similar problem as JB except my mail merge can result in a number
such as $5,000.00 or it may be $0.00 or it may be blank. I used the example
you gave JB (i.e., {MERGEFIELD ExcelData \# 0;;}'), and it works great for my
blanks and my numbers such as $5,000 but if the value is $0.00 it shows as a
blank after I mail merge. How can I get my $0.00 values to show as zeros,
but my blanks to show as blanks.

Thanks so much for your time!

njt


"macropod" wrote:

Hi JB,

You can fix this by adding a numeric picture switch to the field. To do
this:
.. select your mergefield and press Shift-F9 to expose the code. It should
look something like:
{MERGEFIELD ExcelData}
where 'ExcelData' is you field name
.. delete anything after 'ExcelData' and add '\# 0;;') to the field so that
you've got:
'{MERGEFIELD ExcelData \# 0;;}'
.. press F9 to update the field
.. run your mailmerge

Cheers

--
macropod
[MVP - Microsoft Word]


"JB reluctantly from WP"
wrote in message ...
Hello,

I have an Excel database file, and am merging into a Word document. I am
familiar with Word's merge process. However, I have a field in the

database
called RADIO that is a 3-digit number, or the field may be blank. The

Word
document displays the blank fields as a zero. I want them to be blank. I
have read previous posts about using switches within my mergefield, and

they
kind of make sense, but none seem to be the right fix for my particular

need.

Currently displayed in Word document: {Mergefield "Radio"}
I need this to only display text if not blank in database.

Any assistance is greatly appreciated!

Julie ~ reluctantly switching from WordPerfect to Word (sheesh!)




  #12  
Old February 23rd, 2009, 12:49 AM posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP on news.microsoft.com
external usenet poster
 
Posts: 409
Default Mergefield suppress if data field blank

Use

{MERGEFIELD ExcelData \# "$,0.00;($,0.00);" }

or if you prefer

{MERGEFIELD ExcelData \# "$,0.00;-$,0.00;" }

--
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

"njt" wrote in message
...
I have a similar problem as JB except my mail merge can result in a number
such as $5,000.00 or it may be $0.00 or it may be blank. I used the
example
you gave JB (i.e., {MERGEFIELD ExcelData \# 0;;}'), and it works great for
my
blanks and my numbers such as $5,000 but if the value is $0.00 it shows as
a
blank after I mail merge. How can I get my $0.00 values to show as zeros,
but my blanks to show as blanks.

Thanks so much for your time!

njt


"macropod" wrote:

Hi JB,

You can fix this by adding a numeric picture switch to the field. To do
this:
.. select your mergefield and press Shift-F9 to expose the code. It
should
look something like:
{MERGEFIELD ExcelData}
where 'ExcelData' is you field name
.. delete anything after 'ExcelData' and add '\# 0;;') to the field so
that
you've got:
'{MERGEFIELD ExcelData \# 0;;}'
.. press F9 to update the field
.. run your mailmerge

Cheers

--
macropod
[MVP - Microsoft Word]


"JB reluctantly from WP"
wrote in message
...
Hello,

I have an Excel database file, and am merging into a Word document. I
am
familiar with Word's merge process. However, I have a field in the

database
called RADIO that is a 3-digit number, or the field may be blank. The

Word
document displays the blank fields as a zero. I want them to be blank.
I
have read previous posts about using switches within my mergefield, and

they
kind of make sense, but none seem to be the right fix for my particular

need.

Currently displayed in Word document: {Mergefield "Radio"}
I need this to only display text if not blank in database.

Any assistance is greatly appreciated!

Julie ~ reluctantly switching from WordPerfect to Word (sheesh!)






  #13  
Old February 23rd, 2009, 05:42 PM posted to microsoft.public.word.mailmerge.fields
NJT
external usenet poster
 
Posts: 4
Default Mergefield suppress if data field blank

Doug,

Thanks for your response. I tried your suggestion but in my word report I
am still just getting numbers in excess of $0 (ex. $5,000) or a blank. If
the number in the Access column is entered as a $0 it shows up in my word
document as a blank. I need to make a distinction between the access entries
where we have entered $0 and entries where we have intentionally left a
blank. Any suggestions?

Thanks, Jaree

"Doug Robbins - Word MVP on news.microsof" wrote:

Use

{MERGEFIELD ExcelData \# "$,0.00;($,0.00);" }

or if you prefer

{MERGEFIELD ExcelData \# "$,0.00;-$,0.00;" }

--
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

"njt" wrote in message
...
I have a similar problem as JB except my mail merge can result in a number
such as $5,000.00 or it may be $0.00 or it may be blank. I used the
example
you gave JB (i.e., {MERGEFIELD ExcelData \# 0;;}'), and it works great for
my
blanks and my numbers such as $5,000 but if the value is $0.00 it shows as
a
blank after I mail merge. How can I get my $0.00 values to show as zeros,
but my blanks to show as blanks.

Thanks so much for your time!

njt


"macropod" wrote:

Hi JB,

You can fix this by adding a numeric picture switch to the field. To do
this:
.. select your mergefield and press Shift-F9 to expose the code. It
should
look something like:
{MERGEFIELD ExcelData}
where 'ExcelData' is you field name
.. delete anything after 'ExcelData' and add '\# 0;;') to the field so
that
you've got:
'{MERGEFIELD ExcelData \# 0;;}'
.. press F9 to update the field
.. run your mailmerge

Cheers

--
macropod
[MVP - Microsoft Word]


"JB reluctantly from WP"
wrote in message
...
Hello,

I have an Excel database file, and am merging into a Word document. I
am
familiar with Word's merge process. However, I have a field in the
database
called RADIO that is a 3-digit number, or the field may be blank. The
Word
document displays the blank fields as a zero. I want them to be blank.
I
have read previous posts about using switches within my mergefield, and
they
kind of make sense, but none seem to be the right fix for my particular
need.

Currently displayed in Word document: {Mergefield "Radio"}
I need this to only display text if not blank in database.

Any assistance is greatly appreciated!

Julie ~ reluctantly switching from WordPerfect to Word (sheesh!)






  #14  
Old February 24th, 2009, 02:36 AM posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP on news.microsoft.com
external usenet poster
 
Posts: 409
Default Mergefield suppress if data field blank

You are going to need to use an If...then...Else field construction

{ IF { MERGEFIELD ExcelData } = 0 "$0.00" {MERGEFIELD ExcelData \#
"$,0.00;($,0.00);" }}

or maybe

{ IF { MERGEFIELD ExcelData } "" {IF { MERGEFIELD ExcelData } 0
{MERGEFIELD ExcelData \# "$,0.00;($,0.00);" } "$0.00" } "" }

--
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

"njt" wrote in message
...
Doug,

Thanks for your response. I tried your suggestion but in my word report I
am still just getting numbers in excess of $0 (ex. $5,000) or a blank. If
the number in the Access column is entered as a $0 it shows up in my word
document as a blank. I need to make a distinction between the access
entries
where we have entered $0 and entries where we have intentionally left a
blank. Any suggestions?

Thanks, Jaree

"Doug Robbins - Word MVP on news.microsof" wrote:

Use

{MERGEFIELD ExcelData \# "$,0.00;($,0.00);" }

or if you prefer

{MERGEFIELD ExcelData \# "$,0.00;-$,0.00;" }

--
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

"njt" wrote in message
...
I have a similar problem as JB except my mail merge can result in a
number
such as $5,000.00 or it may be $0.00 or it may be blank. I used the
example
you gave JB (i.e., {MERGEFIELD ExcelData \# 0;;}'), and it works great
for
my
blanks and my numbers such as $5,000 but if the value is $0.00 it shows
as
a
blank after I mail merge. How can I get my $0.00 values to show as
zeros,
but my blanks to show as blanks.

Thanks so much for your time!

njt


"macropod" wrote:

Hi JB,

You can fix this by adding a numeric picture switch to the field. To
do
this:
.. select your mergefield and press Shift-F9 to expose the code. It
should
look something like:
{MERGEFIELD ExcelData}
where 'ExcelData' is you field name
.. delete anything after 'ExcelData' and add '\# 0;;') to the field so
that
you've got:
'{MERGEFIELD ExcelData \# 0;;}'
.. press F9 to update the field
.. run your mailmerge

Cheers

--
macropod
[MVP - Microsoft Word]


"JB reluctantly from WP"

wrote in message
...
Hello,

I have an Excel database file, and am merging into a Word document.
I
am
familiar with Word's merge process. However, I have a field in the
database
called RADIO that is a 3-digit number, or the field may be blank.
The
Word
document displays the blank fields as a zero. I want them to be
blank.
I
have read previous posts about using switches within my mergefield,
and
they
kind of make sense, but none seem to be the right fix for my
particular
need.

Currently displayed in Word document: {Mergefield "Radio"}
I need this to only display text if not blank in database.

Any assistance is greatly appreciated!

Julie ~ reluctantly switching from WordPerfect to Word (sheesh!)








 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:12 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.