Hi,
If you record the macro (Table > Select > Column, Edit > Find, Replace "," with
"^t"), the macro should work fine.
All you'd need to change is replace
.Wrap = wdFindAsk
with
.Wrap = wdFindStop
If you want to search in a certain column, and not the column the cursor happens
to be in, you can select that column at the start of the macro:
Instead of
Selection.SelectColumn
use
Selection.Tables(1).Columns(4).Select
to select, say, the 4th column.
Regards,
Klaus
> I'd like to create a macro that searches a table column for commas and
> replaces them with tabs. I'm not a programmer and only create my macros
> using the record function although I can edit VB if I have the right command
> language.
hinesgg - 24 Jan 2005 23:37 GMT
That worked, but now I have a new problem. My column originally contained a
list of names separated by commas. The column is a fixed width, and when the
commas are replaced by tabs, some of the names don't wrap to a new line.
Instead, they just continue as if the first names were part of the last name
that appeared before them. I'm trying to find a way to avoid the need to
manually enter a soft return in each situation. Any advice?
> Hi,
>
[quoted text clipped - 20 lines]
> > using the record function although I can edit VB if I have the right command
> > language.
Klaus Linke - 25 Jan 2005 22:48 GMT
> That worked, but now I have a new problem. My column originally
> contained a list of names separated by commas.
[quoted text clipped - 3 lines]
> before them. I'm trying to find a way to avoid the need to manually
> enter a soft return in each situation. Any advice?
You could force a minimal distance by replacing the tabs with a space and a tab.
But the cleaner solution would be to use two columns? If you convert the table
to (tab-delimited) text, and then back to a table, that should be quick.
Greetings,
Klaus