Reply
 
Thread Tools Display Modes
  #1   Report Post  
Jim
 
Posts: n/a
Default How to remove unwanted formatting in mail merge for cells witn no

My original data source is Excel
I have two fields causing me problems - Phone & Date of Birth
Each field is numeric and formatted as Special Phone Number and Date
I only have about 1 out of 10 records with data
I am using mail merge to complete application forms using the data in Excel
I used switches on the phone field to make the data display properly
My problems a
When I view the records in mail merge if there was no date for a record in
Excel, I see a time displayed 12:00:00 AM. When I view the record where
there is no phone number, I see my formatting instead (000) 000-0000.
How do I tell the mail merge to skip blank cells in Excel so I see nothing?
I prefer to not change my data source (say to text to fix this) in Excel as
it is a "live" spreadsheet that users are continously adding data to to fill
in the missing records for phone number and DOB.
  #2   Report Post  
Graham Mayor
 
Posts: n/a
Default

You could use conditionals field eg
{IF {Mergefield Phone} "(000) 000-0000" "{Mergefield Phone}"}
and
{IF {Mergefield DOB} "12:00:00 AM" "{Mergefield DOB}"}

or probably simpler, see the Excel data section of
http://www.gmayor.com/mail_merge_lab...th_word_xp.htm

--

Graham Mayor - Word MVP

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





Jim wrote:
My original data source is Excel
I have two fields causing me problems - Phone & Date of Birth
Each field is numeric and formatted as Special Phone Number and Date
I only have about 1 out of 10 records with data
I am using mail merge to complete application forms using the data in
Excel I used switches on the phone field to make the data display
properly
My problems a
When I view the records in mail merge if there was no date for a
record in Excel, I see a time displayed 12:00:00 AM. When I view the
record where there is no phone number, I see my formatting instead
(000) 000-0000.
How do I tell the mail merge to skip blank cells in Excel so I see
nothing? I prefer to not change my data source (say to text to fix
this) in Excel as it is a "live" spreadsheet that users are
continously adding data to to fill in the missing records for phone
number and DOB.



  #3   Report Post  
Jim
 
Posts: n/a
Default

Graham,

Thanks for the suggestions. I understand how each method appraches the
problem, but I have a few issues.

Going the DDE route, everything seems to work fine until trying to view the
merged document, Word crashes. My versions of Word and Excel are both 2002.
My data set in Excel is 58,000 records. Is one of these the reason?

Using the conditional method, I must not be entering it correctly because I
get the result of PHONE when viewing the merged data in Word instead of a
phone number or nil.

I am entering the merge field (called PHONE H PRE TEXT), highlighting it,
right clicking, choosing Edit Field under Choose A Field and picking IF, when
the Advanced Field Properties text box comes up begining with IF I then enter
the expression as you intruscted for my data:
{IF {MERGEFIELD PHONE H PRE TEXT} "(000) 000-0000" "{MERGEFIELD PHONE H
PRE TEXT}" }

What am I doing wrong?
Do you have step by step instructions for using conditionals?

Thank you,
Jim

"Graham Mayor" wrote:

You could use conditionals field eg
{IF {Mergefield Phone} "(000) 000-0000" "{Mergefield Phone}"}
and
{IF {Mergefield DOB} "12:00:00 AM" "{Mergefield DOB}"}

or probably simpler, see the Excel data section of
http://www.gmayor.com/mail_merge_lab...th_word_xp.htm

--

Graham Mayor - Word MVP

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





Jim wrote:
My original data source is Excel
I have two fields causing me problems - Phone & Date of Birth
Each field is numeric and formatted as Special Phone Number and Date
I only have about 1 out of 10 records with data
I am using mail merge to complete application forms using the data in
Excel I used switches on the phone field to make the data display
properly
My problems a
When I view the records in mail merge if there was no date for a
record in Excel, I see a time displayed 12:00:00 AM. When I view the
record where there is no phone number, I see my formatting instead
(000) 000-0000.
How do I tell the mail merge to skip blank cells in Excel so I see
nothing? I prefer to not change my data source (say to text to fix
this) in Excel as it is a "live" spreadsheet that users are
continously adding data to to fill in the missing records for phone
number and DOB.




  #4   Report Post  
Graham Mayor
 
Posts: n/a
Default

My guess is the problem is the same in either case and that is due to the
spaces in your fieldnames. I would also suggest fieldnames of ten characters
or less. In the short term, putting straight quotes around the fieldnames
should work for the switch option -
{IF {MERGEFIELD "PHONE H PRE TEXT"} "(000) 000-0000" "{MERGEFIELD "PHONE
H PRE TEXT"}" }

--

Graham Mayor - Word MVP

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





Jim wrote:
Graham,

Thanks for the suggestions. I understand how each method appraches
the problem, but I have a few issues.

Going the DDE route, everything seems to work fine until trying to
view the merged document, Word crashes. My versions of Word and
Excel are both 2002. My data set in Excel is 58,000 records. Is one
of these the reason?

Using the conditional method, I must not be entering it correctly
because I get the result of PHONE when viewing the merged data in
Word instead of a phone number or nil.

I am entering the merge field (called PHONE H PRE TEXT), highlighting
it, right clicking, choosing Edit Field under Choose A Field and
picking IF, when the Advanced Field Properties text box comes up
begining with IF I then enter the expression as you intruscted for my
data: {IF {MERGEFIELD PHONE H PRE TEXT} "(000) 000-0000"
"{MERGEFIELD PHONE H PRE TEXT}" }

What am I doing wrong?
Do you have step by step instructions for using conditionals?

Thank you,
Jim

"Graham Mayor" wrote:

You could use conditionals field eg
{IF {Mergefield Phone} "(000) 000-0000" "{Mergefield Phone}"}
and
{IF {Mergefield DOB} "12:00:00 AM" "{Mergefield DOB}"}

or probably simpler, see the Excel data section of
http://www.gmayor.com/mail_merge_lab...th_word_xp.htm

--

Graham Mayor - Word MVP

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





Jim wrote:
My original data source is Excel
I have two fields causing me problems - Phone & Date of Birth
Each field is numeric and formatted as Special Phone Number and Date
I only have about 1 out of 10 records with data
I am using mail merge to complete application forms using the data
in Excel I used switches on the phone field to make the data display
properly
My problems a
When I view the records in mail merge if there was no date for a
record in Excel, I see a time displayed 12:00:00 AM. When I view
the record where there is no phone number, I see my formatting
instead (000) 000-0000.
How do I tell the mail merge to skip blank cells in Excel so I see
nothing? I prefer to not change my data source (say to text to fix
this) in Excel as it is a "live" spreadsheet that users are
continously adding data to to fill in the missing records for phone
number and DOB.



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
mail merge with attachments AS Mailmerge 5 April 9th 05 09:49 AM
Formatting using Excel datasource for mail merge Shawna Mailmerge 1 February 26th 05 01:19 AM
How do I maintain number formatting in a mail merge? Skittles Mailmerge 1 January 28th 05 04:22 AM
English/American date formatting in XP mail merge John Diston Mailmerge 0 January 21st 05 05:17 PM
time formatting and mail merge Lexisch Mailmerge 1 January 21st 05 02:29 AM


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