WORD using an EXCEL database brings a 0 into the merge field

R

rjr

Hello,
I am using excel as a datasource for a WORD document that is set up for
merging. Whenever I have a blank field in my datasource, the merged field in
WORD shows a 0. Example: John 0 Jones instead of John Jones. I need the
formatting to also not include the space if the field is empty so that it
appears properly spaced.
Any help would be appreciated thanks
 
D

Doug Robbins - Word MVP

Use an If...then...Else... field construction that checks for the existence
of data in the Middle Initial field and inserts that field plus the last
name field it there is something, otherwise it inserts the last name field
by itself

{ IF { MERGEFIELD "MiddleInitial" } <> "" "{ MERGEFIELD "MiddleInitial } {
MERGEFIELD "LastName" }" "{ MERGEFIELD "LastName } }

You must use Ctrl+F9 to insert each pair of field delimiters { } and Alt+F9
to toggle off their display.

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

rjr

Doug,
Thank you so much. That's exactly what I was looking for but wasn't able to
figure it out.

I sincerely appreciate the help that I've gotten over the years from people
like you and thanks doesn't seem a large enough word, but it's all I got.
Thanks
BOB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top