Add 2 spaces to end of sentance?

L

Lightjag

I have constructed a number of sentences in excel. Each sentence represents
a field that I ref in my mail merge doc.

Issue: Depending on the situation some sentences are needed and some are
not, so putting a double space after each field in word, may result in 4
spaces after a sentance if one field/sentence is not needed. When I add
spaces to the sentences in excel, word during the mail merge process
removes/ignors the spaces. Any thoughts?

Thanks in advance
 
D

Doug Robbins - Word MVP

You could use an If...then...Else field construction

{IF { MERGEFIELD sentence# } <> "" " { MERGEFIELD sentence# }" "" }

Where there are the required number of spaced between the " and the {
MERGEFIELD

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
 
M

macropod

Hi Lightjag,

The simplest solution might be to add the trailing spaces to your data source.
 
P

Peter Jamieson

As far as I know, neither leading nor trailing spaces will reach Word
from Excel no matter which connection method you use (DDE, ODBC, OLE
DB), except maybe the old Excel converter will do it for .xls files.

However, if you use Excel Insert tab->Symbol (at the end)->Special
Characters to insert "n-spaces", they should reach Word via the default
OLE DB connection. If, however, you also need to use DDE to connect,
they will be converted into "?" characters.

Unfortunately, something also seems to strip "non-breaking space"
characters which would probably be a better option as they are the same
width (AFAIK) as ordinary spaces. But you may find 2 n-spaces, an
m-space+an n-space or some such works for you.


Peter Jamieson

http://tips.pjmsn.me.uk
 

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