Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
ew68 ew68 is offline
external usenet poster
 
Posts: 2
Default question about formatting labels (mail merge)

I am trying to create an address book using mail merge with the layout being
formatted for labels. The input file is an Access Database.

After the mail merge is performed, I have to manually delete all of the "-"
characters. These are for Access database fields which are not populated. I
guess this is some kind of null value.

Is there some way for me to automatically remove the null fields from the
label? In the label, I have some entries which look like "cell -" which
means that no value was provided for the "cell" field in the Access database
for the given record. I would like the row of the label containing "cell - "
to be removed/deleted.

Any suggestions on how I can do this in an automated fashion? Deleting
these kind of rows manually is very tedious.
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default question about formatting labels (mail merge)

Why use mail merge when Access has its own label wizard?

To deal with the blank fields issue, use the fact that in Access
Something+Null = Null

You can just use the one control on the label with something like

=[F_Name] & " " & [L_Name] & (Chr(13)+Chr(10)+"Cell: "+[Cell])

as the data for the control.

With that control, if there was data in the Cell field, there would be a
second line on the label, commencing with Cell: and the cell number; If the
Cell field was empty, there would only the one line on the label with the
first and the last name.

To do it with mailmerge, you have to use an If...then...Else field
construction
{ IF { MERGEFIELD Cell } "" "Cell: { MERGEFIELD Cell } }

It becomes quite involved however if there are multiple fields that might be
empty and you do not want the words such as Cell: or blank lines appearing
in the output.


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

"ew68" wrote in message
...
I am trying to create an address book using mail merge with the layout
being
formatted for labels. The input file is an Access Database.

After the mail merge is performed, I have to manually delete all of the
"-"
characters. These are for Access database fields which are not populated.
I
guess this is some kind of null value.

Is there some way for me to automatically remove the null fields from the
label? In the label, I have some entries which look like "cell -" which
means that no value was provided for the "cell" field in the Access
database
for the given record. I would like the row of the label containing
"cell - "
to be removed/deleted.

Any suggestions on how I can do this in an automated fashion? Deleting
these kind of rows manually is very tedious.


  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default question about formatting labels (mail merge)

Why use mail merge when Access has its own label wizard?

To deal with the blank fields issue, use the fact that in Access
Something+Null = Null

You can just use the one control on the label with something like

=[F_Name] & " " & [L_Name] & (Chr(13)+Chr(10)+"Cell: "+[Cell])

as the data for the control.

With that control, if there was data in the Cell field, there would be a
second line on the label, commencing with Cell: and the cell number; If the
Cell field was empty, there would only the one line on the label with the
first and the last name.

To do it with mailmerge, you have to use an If...then...Else field
construction
{ IF { MERGEFIELD Cell } "" "Cell: { MERGEFIELD Cell } }

It becomes quite involved however if there are multiple fields that might be
empty and you do not want the words such as Cell: or blank lines appearing
in the output.


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

"ew68" wrote in message
...
I am trying to create an address book using mail merge with the layout
being
formatted for labels. The input file is an Access Database.

After the mail merge is performed, I have to manually delete all of the
"-"
characters. These are for Access database fields which are not populated.
I
guess this is some kind of null value.

Is there some way for me to automatically remove the null fields from the
label? In the label, I have some entries which look like "cell -" which
means that no value was provided for the "cell" field in the Access
database
for the given record. I would like the row of the label containing
"cell - "
to be removed/deleted.

Any suggestions on how I can do this in an automated fashion? Deleting
these kind of rows manually is very tedious.


  #4   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default question about formatting labels (mail merge)

Hi ew68,

In Word:
.. duplicate the mailmerge field to be suppressed (eg «MyData») so that you get «MyData»«MyData»;
.. select both fields and Press Ctrl-F9 to enclose them in a new field, thus { «MyData»«MyData» };
.. fill in between the braces so that you end up with {IF«myData» "cell - " "«MyData»¶
"}, where the '¶' is a paragraph mark or line-feed, depending on which you're using;
.. delete the existing paragraph mark or line-feed after the field;
.. position the cursor anywhere in this field and press F9 to update it;
.. since you're working with labels, complete the coding for the first label, then simply copy & paste it to each of the others.
.. run your mailmerge.

If you find that you've sometimes got 'Cell' and sometimes 'cell' (or any other uppercase/lowercase mix, reselect the above fields
and press F9 to expose the field code. You'll now see something like:
{IF{MERGEFIELD myData} "cell - " "{ MERGEFIELD myData}¶
"}
Simply edit the code so that you end up with:
{IF{MERGEFIELD myData \* lower} "cell - " "{ MERGEFIELD myData}¶
"}

--
Cheers
macropod
[Microsoft MVP - Word]


"ew68" wrote in message ...
I am trying to create an address book using mail merge with the layout being
formatted for labels. The input file is an Access Database.

After the mail merge is performed, I have to manually delete all of the "-"
characters. These are for Access database fields which are not populated. I
guess this is some kind of null value.

Is there some way for me to automatically remove the null fields from the
label? In the label, I have some entries which look like "cell -" which
means that no value was provided for the "cell" field in the Access database
for the given record. I would like the row of the label containing "cell - "
to be removed/deleted.

Any suggestions on how I can do this in an automated fashion? Deleting
these kind of rows manually is very tedious.


  #5   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default question about formatting labels (mail merge)


Hi ew68,

In Word:
.. duplicate the mailmerge field to be suppressed (eg «MyData») so that you get «MyData»«MyData»;
.. select both fields and Press Ctrl-F9 to enclose them in a new field, thus { «MyData»«MyData» };
.. fill in between the braces so that you end up with {IF«myData» "cell - " "«MyData»¶
"}, where the '¶' is a paragraph mark or line-feed, depending on which you're using;
.. delete the existing paragraph mark or line-feed after the field;
.. position the cursor anywhere in this field and press F9 to update it;
.. since you're working with labels, complete the coding for the first label, then simply copy & paste it to each of the others.
.. run your mailmerge.

If you find that you've sometimes got 'Cell' and sometimes 'cell' (or any other uppercase/lowercase mix, reselect the above fields
and press F9 to expose the field code. You'll now see something like:
{IF{MERGEFIELD myData} "cell - " "{ MERGEFIELD myData}¶
"}
Simply edit the code so that you end up with:
{IF{MERGEFIELD myData \* lower} "cell - " "{ MERGEFIELD myData}¶
"}

--
Cheers
macropod
[Microsoft MVP - Word]


"ew68" wrote in message ...
I am trying to create an address book using mail merge with the layout being
formatted for labels. The input file is an Access Database.

After the mail merge is performed, I have to manually delete all of the "-"
characters. These are for Access database fields which are not populated. I
guess this is some kind of null value.

Is there some way for me to automatically remove the null fields from the
label? In the label, I have some entries which look like "cell -" which
means that no value was provided for the "cell" field in the Access database
for the given record. I would like the row of the label containing "cell - "
to be removed/deleted.

Any suggestions on how I can do this in an automated fashion? Deleting
these kind of rows manually is very tedious.


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
My mail merge for labels will only update the first 3 labels Kelcy Mailmerge 3 October 17th 08 01:17 AM
Merge field formatting question Drew Formatting Long Documents 1 September 27th 08 04:06 AM
Mail merge to continuous labels skips labels between pages Devon Stout Mailmerge 8 July 10th 06 07:11 PM
How to apply formatting to all labels in a mail merge document? Notatechie Microsoft Word Help 3 January 9th 06 03:48 PM
Word Labels into Mail Merge Labels GG Katie Mailmerge 1 January 24th 05 11:12 PM


All times are GMT +1. The time now is 11:39 AM.

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"