View Single Post
  #5   Report Post  
Posted to microsoft.public.word.tables
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default Convert text to table with SPACES separator

You can type a space into the Other box.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

"paper" wrote in message
news
Hi Graham,

I just checked the version used in my office. It is WORD professional
edition 2003 (11.8227.8202) SP3. And there is an option "Space" under the
"Separate text at" in the "Table--Covert---Text to table". It is suprising
because there are only 4 options under the "Separate text at" in WORD 2007
and other version of WORD 2003 I used before. However, the one in my
office
has 5 options. That is, one additional option "Space" there.

I don't know if there is any way that I can put "Space" as an option under
the "Separate text at".

Thanks

"Graham Mayor" wrote:

I don't see that option in either Word 2003 or 2007, however the
following
macro should do the trick

With Selection
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "[ ]{1,}"
.Replacement.Text = ", "
.Forward = True
.Wrap = wdFindContinue
.MatchWildcards = True
.Execute Replace:=wdReplaceAll
End With
.WholeStory
.ConvertToTable Separator:=wdSeparateByCommas
End With

If you want to break the text where there are two spaces or more change
the
{1,} to {2,}
http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



paper wrote:
I am trying to covert text to table while the text is separated by
multiple spaces, like following:

1 a c d
2 c b c

Obvious, the nuber of spaces between different columns varies. I can
covert the above text to table easily in my office, using the
table-convert text to table in Word 2003. In that version, I can see
the "Separate text at" "Spaces". And the WORD will recognize multiple
spaces as only one, and separate the text correctly. However, in my
laptop, which uses Word 2007, there is no obvious "Spaces" as an
option under "Separate text at", so I have to input the space in the
"Option" area. Unfortunately, after doing that, the multiple spaces
in the text will also create several columns, which I don't want to
see.

Any solutions?

Thanks