delte spacing in merged document

R

Ruud

I'am merging a word template with an access database. Can somebody explain if
it is possible to automatically delete the line or blank space which occurs
when the the access field has no entry in the merged document

So as an example when the letter is adressed to a compnay

Mr. John Doe
XYZ Inc
P.O. Box 123
Etc

Or when there is no company and Mr. Doe is not a Mr.

John Doe

P.O Box 123
Etc.

Thanks for your assistence.
Kind Regards,
Ruud
 
D

Doug Robbins - Word MVP

You can do this by the use of If...then...Else field constructions in the
mail merge main documnet

e.g

{ IF { MERGEFIELD Title } = "" "{ MERGEFIELD FirstName }" "{ MERGEFIELD
Title } { MERGEFIELD FirstName }" }

and

{ IF { MERGEFIELD Company } = "" "{ MERGEFIELD Address1 }" "{ MERGEFIELD
Company }[Enter]
{ MERGEFIELD Address1 }" }

You must use Ctrl+F9 to insert each paird of field delimiters { } and in
place of the [Enter] in the second construction, you press the Enter key (or
Shift+Enter) at that point so that the balance of the field construction is
on a new line.

Use Alt+F9 to toggle off the display of the field codes.

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

Ruud

Doug,

Thanks.
--
Kind Regards,
Ruud


Doug Robbins - Word MVP said:
You can do this by the use of If...then...Else field constructions in the
mail merge main documnet

e.g

{ IF { MERGEFIELD Title } = "" "{ MERGEFIELD FirstName }" "{ MERGEFIELD
Title } { MERGEFIELD FirstName }" }

and

{ IF { MERGEFIELD Company } = "" "{ MERGEFIELD Address1 }" "{ MERGEFIELD
Company }[Enter]
{ MERGEFIELD Address1 }" }

You must use Ctrl+F9 to insert each paird of field delimiters { } and in
place of the [Enter] in the second construction, you press the Enter key (or
Shift+Enter) at that point so that the balance of the field construction is
on a new line.

Use Alt+F9 to toggle off the display of the field codes.

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

Ruud said:
I'am merging a word template with an access database. Can somebody explain
if
it is possible to automatically delete the line or blank space which
occurs
when the the access field has no entry in the merged document

So as an example when the letter is adressed to a compnay

Mr. John Doe
XYZ Inc
P.O. Box 123
Etc

Or when there is no company and Mr. Doe is not a Mr.

John Doe

P.O Box 123
Etc.

Thanks for your assistence.
Kind Regards,
Ruud
 

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