Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / December 2007

Tip: Looking for answers? Try searching our database.

Displaying field names in merge (but not when blank)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Burt - 07 Dec 2007 08:51 GMT
Someone would like to create labels that also incude the name of the field e.g.

Name: Carol
Position: Manager
Salary : £50,000

but if the Access data base where their data is has a blank for some data
they don't want the field name printed i.e. if in the above example there is
no Position in the data base the label should say

Name: Carol
Salary : £50,000

and not

Name: Carol
Position:
Salary : £50,000

Any ideas?
macropod - 07 Dec 2007 10:23 GMT
Burt

Taking your «Name» field as an example:
1. Make a copy of the field, so that you've got two instances of it side by side, thus
    «Name» «Name»
2. Select both copies and press Ctrl-F9. This wraps your fields in a new one, thus
    { «Name» «Name» }
3. Fill in & around the field braces, thus
    {IF«Name»= "" "" "Name: «Name»"}
paying careful attention to the spacing and quote characters
4. Press F9 to update.

If you also want to suppress the empty paragraph when the result is empty, place all three sets of fields on the same line, thus
    {IF«Name»= "" "" "Name: «Name»"}{IF«Position»= "" "" "Position: «Position»"}{IF«Salary»= "" "" "Salary: «Salary»"}
then insert paragraph markers thus
{IF«Name»= "" "" "Name: «Name»¶
"}{IF«Position»= "" "" "Position: «Position»¶
"}{IF«Salary»= "" "" "Name: «Salary»"}
(using a 'proper' paragraph mark instead of the ¶ character I've used).

An alternative approach for the «Salary» field would be not to make a copy, but to:
. select it and press Shift-F9 to reveal its coding (ie {MERGEFIELD Salary})
. add a switch to field field, thus
{MERGEFIELD Salary \# "Salary: £,0;;"}
. Press F9 to update.

Cheers
Signature

macropod
[MVP - Microsoft Word]
-------------------------

> Someone would like to create labels that also incude the name of the field e.g.
>
[quoted text clipped - 16 lines]
>
> Any ideas?
Burt - 07 Dec 2007 11:02 GMT
thank you for your swift response.  I'll give it a go.

> Burt
>
[quoted text clipped - 43 lines]
> >
> > Any ideas?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.