How to keep leading spaces?

L

Lee Harris

I've gone to a lot of trouble formatting a series of strings that look like

xx/xx/xx

where xx is a number (these aren't dates)

and adding spaces so that the length of the string is always 8 characters,
then using a fixed width font with mail merge so that all the columns lineup

however, when I insert the fields, it seems Word is ignoring any leading
spaces even if I specifically set the Excel data as text (and also with a
preceding ' character it still doesn't work)

how can I tell Word that when an Excel field is [space]7/11/29, I want it
printing with the space and not just as 7/11/29

many thanks if anyone knows

cheers,
lee
 
G

Graham Mayor

You will find it a lot easier to make it 07/11/29 by using a formatting
switch

eg {Mergefield fieldname \@ "MM/dd/yy"}
or
{Mergefield fieldname \@ "dd/MM/yy"}
as appropriate for your location.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
L

Lee Harris

Graham Mayor said:
You will find it a lot easier to make it 07/11/29 by using a formatting
switch

07/11/29 won't be correct though, I need [space]7/11/29

thanks anyway
 
L

Lee Harris

Graham Mayor said:
You will find it a lot easier to make it 07/11/29 by using a formatting
switch

eg {Mergefield fieldname \@ "MM/dd/yy"}
or
{Mergefield fieldname \@ "dd/MM/yy"}
as appropriate for your location.

--
ps
its not a date/date format
 
G

Graham Mayor

Oops - I just spotted that the numbers were not dates (not that it should
matter if they look like dates).
The simple alternative is to use a decimal tab set at the position of the
first '/'.
the numbers will then line up on the slash position.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Graham Mayor

I spotted that just as I clicked 'send'. Did you seet my later post?

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