Is there an easy way to convert an ASCII table to a Word table in Word XP?
I've found that interestingly enough, if I hit Enter at the end of an ASCII
table line, Word will insert a Word table with all the same column
divisions, properly aligned with the previous ASCII text row, but despite
that capability, it appears to be unable to actually convert from an ASCII
table to a Word table directly.
If it makes a difference, in this case, the ASCII table format is:
+-------+-------+
| Col 1 | Col 2 |
+-------+-------+
| Text | Text |
+-------+-------+
Doing a Convert Table to Text with | as the delimiter does a partial job,
but I'm hoping there's some better way of doing it than that.
Thanks,
Rob
Suzanne S. Barnhill - 21 Jan 2008 00:11 GMT
What's happening when you press Enter at the end of an ASCII row is based on
your settings wrt "Apply as you type: Tables" on the AutoFormat As You Type
tab of Tools | AutoCorrect Options. Unfortunately, the AutoFormat tab
doesn't include "tables" as an option, so AFAIK, there is no way to
accomplish what you want other than row by row.

Signature
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
> Is there an easy way to convert an ASCII table to a Word table in Word XP?
> I've found that interestingly enough, if I hit Enter at the end of an
[quoted text clipped - 16 lines]
> Thanks,
> Rob
Robert Morley - 21 Jan 2008 06:01 GMT
Thanks Suzanne. I hadn't clued into the fact that that was coming from
AutoFormat As You Type, though I hadn't really thought about it either. I'm
not entirely surprised that there's no facility to convert an ASCII table to
a Word table.
I suppose I could always make a macro in VBA...just ignore the +---+ lines
and parse the pipe-delimited lines. It's not a big project I'm working on,
so I'll think about it and decide later. :)
Rob
> What's happening when you press Enter at the end of an ASCII row is based on
> your settings wrt "Apply as you type: Tables" on the AutoFormat As You Type
> tab of Tools | AutoCorrect Options. Unfortunately, the AutoFormat tab
> doesn't include "tables" as an option, so AFAIK, there is no way to
> accomplish what you want other than row by row.
Suzanne S. Barnhill - 21 Jan 2008 06:05 GMT
Shouldn't even require VBA. Use Find and Replace to replace the +---+ lines
with nothing, then use Table | Convert | Text to Table separating at <pipe>.

Signature
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
> Thanks Suzanne. I hadn't clued into the fact that that was coming from
> AutoFormat As You Type, though I hadn't really thought about it either.
[quoted text clipped - 12 lines]
>> tab doesn't include "tables" as an option, so AFAIK, there is no way to
>> accomplish what you want other than row by row.
Robert Morley - 21 Jan 2008 06:16 GMT
Yeah, I've tried that, and it works to some degree, but it's a
less-than-perfect solution since it has no ability to merge multiple
consecutive piped lines into a single row, and also leaves a lot of spaces
in the table.
Rob
> Shouldn't even require VBA. Use Find and Replace to replace the +---+ lines
> with nothing, then use Table | Convert | Text to Table separating at <pipe>.