Erroneous spaces in a multiple field merge document

K

KallKwik Didcot

Hi all
I am merging in MS Word 2000 from a database in Excel 2000 on a windows 2000
platform.

My problem is:

I am trying to create a merge which reads 4 sets of data and places it into
four different positions onto the page. That is, four lots of addresses (all
different) onto the four locations so that when the page is cut each section
it has a unique addresses.

The merge works fine except for the dreaded extra space if the title field
is blank.

I am using an If-Then-Else word field to get rid of the space BUT the
problem is that Word seems to query the each page just once to insert the
data and if the 'A' field does not have a title, it removes the space from
the remaining three positions wether they contain a title or not.

Any ideas please, as it works fine apart from this

Cheers

Mark
 
P

Peter Jamieson

What are the exact field codes you are using to do this (e.g. just for the
first and second addresses on the page)?
 
K

KallKwik Didcot

Hi Peter

The field code is:
«ATitle»{IF Dr = "" "" " "} «AForename»

and I have repeat this in each of the four positions.

Thanks

Mark
 
K

KallKwik Didcot

Sorry, meant to say.

The different positions are labelled 'A', 'B', 'C' and 'D'
and draw data from likewise named columns in Excel and I've copied just the
IF-THEN-ELSE statement to each position.

Thanks

Mark
 
P

Peter Jamieson

Just a suggestion:

Assuming "Dr" is a field in your data source, change it to the mergefield
«Dr», i.e. using Alt-F9 to show the field codes in full, I would expect to
see:

{ MERGEFIELD ATitle }{ IF { MERGEFIELD Dr } = "" "" " " }{ MERGEFIELD
AForename }

If "Dr" isn't a mergefield, then presumably you are setting it somewhere, in
which case I'd expect to have to set it for each of your 4 records.
 
K

KallKwik Didcot

Spot on Peter!
Each IF-THEN statement was pointing to the 'A' field.
As another point of interest, the 'Dr' actually refers to the first value in
the 'A' Title field. If I had looked harder I should have spotted that it
was the same in all the fields in my merge doc. I will never make a Sherlock
Holmes.

Thanks again

Mark
 

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