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
  #1  
Old November 16th, 2006, 08:19 PM posted to microsoft.public.word.mailmerge.fields
JB reluctantly from WP
external usenet poster
 
Posts: 5
Default Mergefield suppress if data field blank

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!)
  #2  
Old November 16th, 2006, 09:17 PM posted to microsoft.public.word.mailmerge.fields
Cindy B
external usenet poster
 
Posts: 14
Default Mergefield suppress if data field blank

I’ve seen a lot of inconsistencies with newer versions of word as well. I
would suggest creating an If Then Else statement to control the field. “If
mergefield is not blank then insert otherwise do nothing”

Good luck.
  #3  
Old November 16th, 2006, 09:30 PM posted to microsoft.public.word.mailmerge.fields
macropod
external usenet poster
 
Posts: 1,231
Default Mergefield suppress if data field blank

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



  #4  
Old November 16th, 2006, 10:03 PM posted to microsoft.public.word.mailmerge.fields
JB reluctantly from WP
external usenet poster
 
Posts: 5
Default Mergefield suppress if data field blank

Macropod,

Thank you so much! I knew I didn't have to make long complicated IF, THEN,
ELSE statements to get the result I wanted! I really appreciate your help.

~Julie

"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!)




  #5  
Old December 18th, 2008, 10:44 AM posted to microsoft.public.word.mailmerge.fields
malycom
external usenet poster
 
Posts: 47
Default Mergefield suppress if data field blank

Macprod, this has helped me a little also, but if you are still viewing this
2 years on, I wonder if you cousl assist a little more?

I have also used your {MERGEFIELD ExcelData \# 0;;} example in fields but
there are instances where there are problems.

If an address is '43 something street', the result coming back is '43' with
the rest of the line missing.

This seems to happen everywhere there is more than one word in a mergefield.
Any time there is a space, the data inserted stops at the first space.

Is there anything you can suggest?

Regards

"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!)




  #6  
Old December 19th, 2008, 06:54 AM posted to microsoft.public.word.mailmerge.fields
macropod[_2_]
external usenet poster
 
Posts: 2,402
Default Mergefield suppress if data field blank

Hi malycom,

If you want an alpha-numeric string (eg an address) to appear in full, delete the picture switch - it's only intended to suppress 0s
in empty numeric fields. Using it elsewhere returns just the number - as you've discovered.

--
Cheers
macropod
[MVP - Microsoft Word]


"malycom" wrote in message ...
Macprod, this has helped me a little also, but if you are still viewing this
2 years on, I wonder if you cousl assist a little more?

I have also used your {MERGEFIELD ExcelData \# 0;;} example in fields but
there are instances where there are problems.

If an address is '43 something street', the result coming back is '43' with
the rest of the line missing.

This seems to happen everywhere there is more than one word in a mergefield.
Any time there is a space, the data inserted stops at the first space.

Is there anything you can suggest?

Regards

"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!)





  #7  
Old December 22nd, 2008, 08:55 AM posted to microsoft.public.word.mailmerge.fields
malycom
external usenet poster
 
Posts: 47
Default Mergefield suppress if data field blank

Thanks for your reply Macprod - Unfortunately, I have no idea what a picture
switch is. I think I have enough to be able to do what I need for now.

Thanks for your reply though

Regards

"macropod" wrote:

Hi malycom,

If you want an alpha-numeric string (eg an address) to appear in full, delete the picture switch - it's only intended to suppress 0s
in empty numeric fields. Using it elsewhere returns just the number - as you've discovered.

--
Cheers
macropod
[MVP - Microsoft Word]


"malycom" wrote in message ...
Macprod, this has helped me a little also, but if you are still viewing this
2 years on, I wonder if you cousl assist a little more?

I have also used your {MERGEFIELD ExcelData \# 0;;} example in fields but
there are instances where there are problems.

If an address is '43 something street', the result coming back is '43' with
the rest of the line missing.

This seems to happen everywhere there is more than one word in a mergefield.
Any time there is a space, the data inserted stops at the first space.

Is there anything you can suggest?

Regards

"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!)





  #8  
Old December 22nd, 2008, 10:02 AM posted to microsoft.public.word.mailmerge.fields
macropod[_2_]
external usenet poster
 
Posts: 2,402
Default Mergefield suppress if data field blank

Hi malycom,

The picture switch in this case is '\# 0;;' - and is referred to as such in my old post that you included in your initial post.

Simply delete it and run your mailmerge.

--
Cheers
macropod
[MVP - Microsoft Word]


"malycom" wrote in message ...
Thanks for your reply Macprod - Unfortunately, I have no idea what a picture
switch is. I think I have enough to be able to do what I need for now.

Thanks for your reply though

Regards

"macropod" wrote:

Hi malycom,

If you want an alpha-numeric string (eg an address) to appear in full, delete the picture switch - it's only intended to suppress
0s
in empty numeric fields. Using it elsewhere returns just the number - as you've discovered.

--
Cheers
macropod
[MVP - Microsoft Word]


"malycom" wrote in message ...
Macprod, this has helped me a little also, but if you are still viewing this
2 years on, I wonder if you cousl assist a little more?

I have also used your {MERGEFIELD ExcelData \# 0;;} example in fields but
there are instances where there are problems.

If an address is '43 something street', the result coming back is '43' with
the rest of the line missing.

This seems to happen everywhere there is more than one word in a mergefield.
Any time there is a space, the data inserted stops at the first space.

Is there anything you can suggest?

Regards

"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!)






  #9  
Old December 22nd, 2008, 10:10 AM posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
external usenet poster
 
Posts: 4,550
Default Mergefield suppress if data field blank

The "picture switch" is the "\# 0;;" part of the field which specifies a
format for your data.

In this case "\#" is the switch and "0;;" is the picture.

"switch" and "picture" are both longstanding computer jargon - "switch"
referring to something that alters the behaviour of a "command" of some
kind. In this case the "command" is a field code. "picture" because a
format such as "0.00" is in a sense a "picture" of how the data should look.


Peter Jamieson

http://tips.pjmsn.me.uk

malycom wrote:
Thanks for your reply Macprod - Unfortunately, I have no idea what a picture
switch is. I think I have enough to be able to do what I need for now.

Thanks for your reply though

Regards

"macropod" wrote:

Hi malycom,

If you want an alpha-numeric string (eg an address) to appear in full, delete the picture switch - it's only intended to suppress 0s
in empty numeric fields. Using it elsewhere returns just the number - as you've discovered.

--
Cheers
macropod
[MVP - Microsoft Word]


"malycom" wrote in message ...
Macprod, this has helped me a little also, but if you are still viewing this
2 years on, I wonder if you cousl assist a little more?

I have also used your {MERGEFIELD ExcelData \# 0;;} example in fields but
there are instances where there are problems.

If an address is '43 something street', the result coming back is '43' with
the rest of the line missing.

This seems to happen everywhere there is more than one word in a mergefield.
Any time there is a space, the data inserted stops at the first space.

Is there anything you can suggest?

Regards

"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!)



  #10  
Old December 22nd, 2008, 10:33 AM posted to microsoft.public.word.mailmerge.fields
malycom
external usenet poster
 
Posts: 47
Default Mergefield suppress if data field blank

Thanks Peter - Really useful info there. That makes a lot of sense now.

Regards

"Peter Jamieson" wrote:

The "picture switch" is the "\# 0;;" part of the field which specifies a
format for your data.

In this case "\#" is the switch and "0;;" is the picture.

"switch" and "picture" are both longstanding computer jargon - "switch"
referring to something that alters the behaviour of a "command" of some
kind. In this case the "command" is a field code. "picture" because a
format such as "0.00" is in a sense a "picture" of how the data should look.


Peter Jamieson

http://tips.pjmsn.me.uk

malycom wrote:
Thanks for your reply Macprod - Unfortunately, I have no idea what a picture
switch is. I think I have enough to be able to do what I need for now.

Thanks for your reply though

Regards

"macropod" wrote:

Hi malycom,

If you want an alpha-numeric string (eg an address) to appear in full, delete the picture switch - it's only intended to suppress 0s
in empty numeric fields. Using it elsewhere returns just the number - as you've discovered.

--
Cheers
macropod
[MVP - Microsoft Word]


"malycom" wrote in message ...
Macprod, this has helped me a little also, but if you are still viewing this
2 years on, I wonder if you cousl assist a little more?

I have also used your {MERGEFIELD ExcelData \# 0;;} example in fields but
there are instances where there are problems.

If an address is '43 something street', the result coming back is '43' with
the rest of the line missing.

This seems to happen everywhere there is more than one word in a mergefield.
Any time there is a space, the data inserted stops at the first space.

Is there anything you can suggest?

Regards

"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 09:29 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.