Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Burt Burt is offline
external usenet poster
 
Posts: 20
Default Displaying field names in merge (but not when blank)

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?

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod macropod is offline
external usenet poster
 
Posts: 1,002
Default Displaying field names in merge (but not when blank)

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
--
macropod
[MVP - Microsoft Word]
-------------------------

"Burt" wrote in message ...
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?


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Burt Burt is offline
external usenet poster
 
Posts: 20
Default Displaying field names in merge (but not when blank)

thank you for your swift response. I'll give it a go.

"macropod" wrote:

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
--
macropod
[MVP - Microsoft Word]
-------------------------

"Burt" wrote in message ...
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?



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
Multiple Names in merge field CindyC Mailmerge 1 November 9th 07 08:54 PM
Only displaying part of a merged field/formatting parts of a merge Andy Mailmerge 4 October 23rd 07 12:08 PM
Changing Merge Field Names Microsoft Newsserver Mailmerge 13 October 10th 06 09:29 AM
Word merge field names vs. Excel merge field names [email protected] Mailmerge 5 November 11th 05 05:24 PM
Mail merge field isn't displaying all the text in a field. Can I . mojohubbard Mailmerge 3 March 28th 05 04:45 PM


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