Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / August 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rjr - 01 Aug 2006 16:08 GMT
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
Doug Robbins - Word MVP - 01 Aug 2006 22:08 GMT
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.

Signature

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

> Hello,
> I am using excel as a datasource for a WORD document that is set up for
[quoted text clipped - 3 lines]
> appears properly spaced.
> Any help would be appreciated thanks
rjr - 02 Aug 2006 11:56 GMT
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

> Use an If...then...Else... field construction that checks for the
> existence of data in the Middle Initial field and inserts that field plus
[quoted text clipped - 14 lines]
>> that it appears properly spaced.
>> Any help would be appreciated thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.