View Single Post
  #10   Report Post  
Posted to microsoft.public.word.mailmerge.fields
malycom malycom is offline
external usenet poster
 
Posts: 10
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!)