#1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Christine Christine is offline
external usenet poster
 
Posts: 45
Default Removing spaces

I'm not sure I've been able to find my exact situation so I hope I'm not
duplicating questions. I've seen some solutions that seem close to what I'm
looking for but they look much more complicated than what I think I need.

Here is the problem. I have a Word main merge document with the following
text relating to client phone numbers:
Home:
Cell:
Work:

The phone number source info is from an Access database. In many cases, I
don't have all of the client's phone numbers and if a number does not exist I
would like the line to disappear. For example, I want this appearance

Home: 555-5555
Work: 555-1111

when I don't have a cell number.

Is there a simple way to do this?

Thanks for your help.

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Rich/rerat Rich/rerat is offline
external usenet poster
 
Posts: 93
Default Removing spaces

Christine,
Try inserting the following, if you are using a field called "cellphone".

{if{Mergefield cellphone}"" {Mergefield cellphone} \b "Cellphone: " ""}
Make sure you add a space after the colon ( and the quote marks (")

Remember you need insert the field, you cannot just type "{}".

--
Add MS to your News Reader: news://msnews.microsoft.com
Rich/rerat
(RRR News) message rule
Previous Text Snipped to Save Bandwidth When Appropriate


"Christine" wrote in message
...
I'm not sure I've been able to find my exact situation so I hope I'm not
duplicating questions. I've seen some solutions that seem close to what I'm
looking for but they look much more complicated than what I think I need.

Here is the problem. I have a Word main merge document with the following
text relating to client phone numbers:
Home:
Cell:
Work:

The phone number source info is from an Access database. In many cases, I
don't have all of the client's phone numbers and if a number does not exist
I
would like the line to disappear. For example, I want this appearance

Home: 555-5555
Work: 555-1111

when I don't have a cell number.

Is there a simple way to do this?

Thanks for your help.


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Christine Christine is offline
external usenet poster
 
Posts: 45
Default Removing spaces

Thank you, Rich. I've tried this but it won't work. I've evidently got
something wrong. I copied your formula exactly, except I changed the field
name to Cell which is the fieldname in the table. Then I pasted the formula
into the merge doc after the field 'Cell'. Actually, I tried a number of
variations of placement but didn't get anywhere. Can you tell me where I
insert the formula exactly?

Thank you,
Christine

"Rich/rerat" wrote:

Christine,
Try inserting the following, if you are using a field called "cellphone".

{if{Mergefield cellphone}"" {Mergefield cellphone} \b "Cellphone: " ""}
Make sure you add a space after the colon ( and the quote marks (")

Remember you need insert the field, you cannot just type "{}".

--
Add MS to your News Reader: news://msnews.microsoft.com
Rich/rerat
(RRR News) message rule
Previous Text Snipped to Save Bandwidth When Appropriate


"Christine" wrote in message
...
I'm not sure I've been able to find my exact situation so I hope I'm not
duplicating questions. I've seen some solutions that seem close to what I'm
looking for but they look much more complicated than what I think I need.

Here is the problem. I have a Word main merge document with the following
text relating to client phone numbers:
Home:
Cell:
Work:

The phone number source info is from an Access database. In many cases, I
don't have all of the client's phone numbers and if a number does not exist
I
would like the line to disappear. For example, I want this appearance

Home: 555-5555
Work: 555-1111

when I don't have a cell number.

Is there a simple way to do this?

Thanks for your help.



  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Rich/rerat Rich/rerat is offline
external usenet poster
 
Posts: 93
Default Removing spaces

Christine,
Sorry I gave you the wrong information.

In the word document, Set up the merge for a directory, use Access as you
database.
Insert the fields for:
Name
Home
Cell
Work

Now Right click each phone field Select Toggle Field Codes, and add the
following switch:
\b "FieldName: "

So you will have the following in your document:
Name
{Mergefield Home \b "Home: "}
{Mergefield Cell \b "Cell: "}
{Mergefield Work \b "Work: "}
Space (This will separate each Record when the Merge is finished)
Space
Then Merge to New Document

--
Add MS to your News Reader: news://msnews.microsoft.com
Rich/rerat
(RRR News) message rule
Previous Text Snipped to Save Bandwidth When Appropriate


"Christine" wrote in message
...
Thank you, Rich. I've tried this but it won't work. I've evidently got
something wrong. I copied your formula exactly, except I changed the field
name to Cell which is the fieldname in the table. Then I pasted the formula
into the merge doc after the field 'Cell'. Actually, I tried a number of
variations of placement but didn't get anywhere. Can you tell me where I
insert the formula exactly?

Thank you,
Christine


"Christine" wrote in message
...
I'm not sure I've been able to find my exact situation so I hope I'm not
duplicating questions. I've seen some solutions that seem close to what
I'm
looking for but they look much more complicated than what I think I need.

Here is the problem. I have a Word main merge document with the following
text relating to client phone numbers:
Home:
Cell:
Work:

The phone number source info is from an Access database. In many cases, I
don't have all of the client's phone numbers and if a number does not
exist
I
would like the line to disappear. For example, I want this appearance

Home: 555-5555
Work: 555-1111

when I don't have a cell number.

Is there a simple way to do this?

Thanks for your help.





  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Removing spaces

You cannot paste fields. Fields brackets {} must be inserted with CTRL+F9

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Christine wrote:
Thank you, Rich. I've tried this but it won't work. I've evidently got
something wrong. I copied your formula exactly, except I changed the
field name to Cell which is the fieldname in the table. Then I pasted
the formula into the merge doc after the field 'Cell'. Actually, I
tried a number of variations of placement but didn't get anywhere.
Can you tell me where I insert the formula exactly?

Thank you,
Christine

"Rich/rerat" wrote:

Christine,
Try inserting the following, if you are using a field called
"cellphone".

{if{Mergefield cellphone}"" {Mergefield cellphone} \b "Cellphone:
" ""} Make sure you add a space after the colon ( and the quote
marks (")

Remember you need insert the field, you cannot just type "{}".

--
Add MS to your News Reader: news://msnews.microsoft.com
Rich/rerat
(RRR News) message rule
Previous Text Snipped to Save Bandwidth When Appropriate


"Christine" wrote in message
...
I'm not sure I've been able to find my exact situation so I hope I'm
not duplicating questions. I've seen some solutions that seem close
to what I'm looking for but they look much more complicated than
what I think I need.

Here is the problem. I have a Word main merge document with the
following text relating to client phone numbers:
Home:
Cell:
Work:

The phone number source info is from an Access database. In many
cases, I don't have all of the client's phone numbers and if a
number does not exist I
would like the line to disappear. For example, I want this appearance

Home: 555-5555
Work: 555-1111

when I don't have a cell number.

Is there a simple way to do this?

Thanks for your help.





  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Christine Christine is offline
external usenet poster
 
Posts: 45
Default Removing spaces

Hi, Rich.
Well, I finally got this to work. I'm so grateful for your help. Thank you!
Everything is working as expected - there's just a little glitch with spacing
between the field name and contents when the phone number is there but I can
work with that by using extra spaces in the code and get it pretty close to
the appearance I want. Howeve, if you know of any other magic that might
correct this, I'd be happy to hear about it. Otherwise, it's great.

Thanks again!
Christine

"Rich/rerat" wrote:

Christine,
Sorry I gave you the wrong information.

In the word document, Set up the merge for a directory, use Access as you
database.
Insert the fields for:
Name
Home
Cell
Work

Now Right click each phone field Select Toggle Field Codes, and add the
following switch:
\b "FieldName: "

So you will have the following in your document:
Name
{Mergefield Home \b "Home: "}
{Mergefield Cell \b "Cell: "}
{Mergefield Work \b "Work: "}
Space (This will separate each Record when the Merge is finished)
Space
Then Merge to New Document

--
Add MS to your News Reader: news://msnews.microsoft.com
Rich/rerat
(RRR News) message rule
Previous Text Snipped to Save Bandwidth When Appropriate


"Christine" wrote in message
...
Thank you, Rich. I've tried this but it won't work. I've evidently got
something wrong. I copied your formula exactly, except I changed the field
name to Cell which is the fieldname in the table. Then I pasted the formula
into the merge doc after the field 'Cell'. Actually, I tried a number of
variations of placement but didn't get anywhere. Can you tell me where I
insert the formula exactly?

Thank you,
Christine


"Christine" wrote in message
...
I'm not sure I've been able to find my exact situation so I hope I'm not
duplicating questions. I've seen some solutions that seem close to what
I'm
looking for but they look much more complicated than what I think I need.

Here is the problem. I have a Word main merge document with the following
text relating to client phone numbers:
Home:
Cell:
Work:

The phone number source info is from an Access database. In many cases, I
don't have all of the client's phone numbers and if a number does not
exist
I
would like the line to disappear. For example, I want this appearance

Home: 555-5555
Work: 555-1111

when I don't have a cell number.

Is there a simple way to do this?

Thanks for your help.






  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Christine Christine is offline
external usenet poster
 
Posts: 45
Default Removing spaces

Hi, Graham. Thank you so much for this note.
Christine

"Graham Mayor" wrote:

You cannot paste fields. Fields brackets {} must be inserted with CTRL+F9

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Christine wrote:
Thank you, Rich. I've tried this but it won't work. I've evidently got
something wrong. I copied your formula exactly, except I changed the
field name to Cell which is the fieldname in the table. Then I pasted
the formula into the merge doc after the field 'Cell'. Actually, I
tried a number of variations of placement but didn't get anywhere.
Can you tell me where I insert the formula exactly?

Thank you,
Christine

"Rich/rerat" wrote:

Christine,
Try inserting the following, if you are using a field called
"cellphone".

{if{Mergefield cellphone}"" {Mergefield cellphone} \b "Cellphone:
" ""} Make sure you add a space after the colon ( and the quote
marks (")

Remember you need insert the field, you cannot just type "{}".

--
Add MS to your News Reader: news://msnews.microsoft.com
Rich/rerat
(RRR News) message rule
Previous Text Snipped to Save Bandwidth When Appropriate


"Christine" wrote in message
...
I'm not sure I've been able to find my exact situation so I hope I'm
not duplicating questions. I've seen some solutions that seem close
to what I'm looking for but they look much more complicated than
what I think I need.

Here is the problem. I have a Word main merge document with the
following text relating to client phone numbers:
Home:
Cell:
Work:

The phone number source info is from an Access database. In many
cases, I don't have all of the client's phone numbers and if a
number does not exist I
would like the line to disappear. For example, I want this appearance

Home: 555-5555
Work: 555-1111

when I don't have a cell number.

Is there a simple way to do this?

Thanks for your help.




  #8   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Rich/rerat Rich/rerat is offline
external usenet poster
 
Posts: 93
Default Removing spaces

Christine,
So you will have the following in your document:
Name
{Mergefield Home \b "Home: "}
{Mergefield Cell \b "Cell: "}
{Mergefield Work \b "Work: "}
Space (This will separate each Record when the Merge is finished)
Space

What you can now do is add an "IF" field to each line:
1. First one at a time, right click each field, Toggle Field Code, and
delete the switch, "\b "fieldname: ".
2. Mouse click, right at the beginning of the mergefield you created.
3. Select the Mergefield toolbar Insert Word Field Select "If.., then"
wizard so for the Home phone line you would do:
If Field Home "Is Not Blank" In the first text box type "Home:" (w/o
quotes). 4. Now press the TAB button twice (x2), this will move the
mergefield for the number to the right.
5. Repeat steps #3 & #4, for the other phone fields. You can also do this
for the NAME: line to.

So it would something like this

{if.., then...} {mergefield name}
{if.., then...} {mergefield home}
{if.., then...} {mergefield cell}
{if.., then...} {mergefield work}

Name: John
Cell: 555-1236

Name: sally
Home: 555-1236
Work: 555-1238

Name: donna
Home: 555-1237
Cell: 555-1238
Work: 1-554-555-1239

Name: harold
Cell: 555-1239
Work: 555-1240

Name: sammy
Home: 555-1239
Cell: 555-1240

Name: Mrs Smith
Home: 1-201-356-2519
Cell: 1-201-356-2520
Work: 1-201-356-2521

Now this will still align the data left to right. So for the phone #'s, you
may need to make sure that the data is in the same format. So if use area
codes for long distance #'s, you will need to use them for the local
numbers, if you want to keep the alignment. But not necessary. Also for the
"Title" of the
line, I would recommend that you capitalize the whole word, since you are
using just 4 letters for the "Title". You may have to experiment with
different fonts to get the desired effect that you want. It might not be
perfect, but you can get close to what you want. As seen in my example
above, but some of the formatting is lost because the message is in Plain
Text, and the message was created in Georgia font.
--
Add MS to your News Reader: news://msnews.microsoft.com
Rich/rerat
(RRR News) message rule
Previous Text Snipped to Save Bandwidth When Appropriate


"Christine" wrote in message
...
Hi, Rich.
Well, I finally got this to work. I'm so grateful for your help. Thank you!
Everything is working as expected - there's just a little glitch with
spacing
between the field name and contents when the phone number is there but I can
work with that by using extra spaces in the code and get it pretty close to
the appearance I want. However, if you know of any other magic that might
correct this, I'd be happy to hear about it. Otherwise, it's great.

Thanks again!
Christine



"Christine" wrote in message
...
I'm not sure I've been able to find my exact situation so I hope I'm not
duplicating questions. I've seen some solutions that seem close to what
I'm
looking for but they look much more complicated than what I think I
need.

Here is the problem. I have a Word main merge document with the
following
text relating to client phone numbers:
Home:
Cell:
Work:

The phone number source info is from an Access database. In many cases,
I
don't have all of the client's phone numbers and if a number does not
exist
I
would like the line to disappear. For example, I want this appearance

Home: 555-5555
Work: 555-1111

when I don't have a cell number.

Is there a simple way to do this?

Thanks for your help.









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
Removing trailing spaces in a table Kamran Microsoft Word Help 6 October 22nd 08 11:17 PM
Removing Spaces with Replace ExcelMonkey Microsoft Word Help 1 January 17th 08 02:40 AM
Searching for spaces and removing them dean-nie Microsoft Word Help 5 January 19th 07 08:57 AM
Removing extra spaces between words GKW in GA Microsoft Word Help 5 August 26th 05 06:29 PM
Removing Unwanted Spaces Chris New Users 3 March 12th 05 09:45 PM


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