Non-breaking space in a merge.

M

MGEAdmin

How to you code a merge field to change spaces to non-breaking spaces in the
variable text (coming from an Excel Spreadsheet where it won't let you insert
non-breaking spaces)?
 
M

macropod

Hi MGEAdmin,

You'll need to change the data source - Excel should allow you to replace your existing spaces (Chr 32) with a non-breaking space
(Chr 160).

Cheers
 
M

MGEAdmin

Using an excel data file it will allow me to change my spaces in Excel but
once I attach the data source to the Main Document and merge the file I lose
the non-breaking space still. Is this because I am using an Excel data source?

macropod said:
Hi MGEAdmin,

You'll need to change the data source - Excel should allow you to replace your existing spaces (Chr 32) with a non-breaking space
(Chr 160).

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

MGEAdmin said:
How to you code a merge field to change spaces to non-breaking spaces in the
variable text (coming from an Excel Spreadsheet where it won't let you insert
non-breaking spaces)?
 
P

Peter Jamieson

AFAICS the no-break spaces will only get through from Excel if you are able
to use the old Excel converter to get the data, or use Edit|Copy, Edit|Paste
into Word, or something similar, and use that as your data source. every
other method of connecting to Excel (OLE DB, ODBC, and even DDE) changes the
Chr 160 to a space.

Personally I would try to avoid using the Converter - it has been
obsolescent since Office 2002 and has one or two other problems, but you can
get it from Graham Mayor's site at

http://www.gmayor.com/downloads.htm

--
Peter Jamieson
http://tips.pjmsn.me.uk

MGEAdmin said:
Using an excel data file it will allow me to change my spaces in Excel but
once I attach the data source to the Main Document and merge the file I
lose
the non-breaking space still. Is this because I am using an Excel data
source?

macropod said:
Hi MGEAdmin,

You'll need to change the data source - Excel should allow you to replace
your existing spaces (Chr 32) with a non-breaking space
(Chr 160).

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

MGEAdmin said:
How to you code a merge field to change spaces to non-breaking spaces
in the
variable text (coming from an Excel Spreadsheet where it won't let you
insert
non-breaking spaces)?
 

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