leading spaces in merge fields

L

LCalaway

I have created a "script" in Word which is filled in by using Access and
merge. The script works wonderfully EXCEPT if there is a leading space in
one of the fields. The merge eliminates the leading space. What would be
the suggestion to retain the leading space that is definitely IN the database
field in Access.
 
L

LCalaway

I am using Office 2003 XP

Here is a portion of my merge document:

«BodyName», «Aged», whose occupation is «Occupation», was born in
«BornWhere»«DateBorn» «Mr» presently resides at «Lives». He

If the Access field that fills in the data for DateBorn is null, a period is
placed at the end of BornWhere. If the Access field that fills in the data
for DateBorn contains a date, the date is preceded by a space. The info in
Access is the result of a query that adds the leading space, which it does
perfectly, but the merge strips out the leading space. How can i keep the
leading space?
 
D

Doug Robbins - Word MVP

Use an If...then...Else field construction

{ If { MERGEFIELD DateBorn } = "" "{ MERGEFIELD BornWhere}." "{ MERGEFIELD
BornWhere } { MERGEFIELD DateBorn }." }

You must use Ctrl + F9 to insert each pair of field delimiters { } and you
use Alt + F9 to toggle off their display. Also, you may need to update the
fields in the document after executing the merge - Ctrl + A, then F9.

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

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