Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
Ed Sheehan Ed Sheehan is offline
external usenet poster
 
Posts: 14
Default Two rows per row?

I have a bunch of rows with every other row terminated by a CR. The previous
row is terminated by a manual line break. Can I convert text to table and
have the two rows occupy one table row, with the end of the first row
holding a soft return?

I can manipulate these characters into something else if needed.

|-----------------------------|---------------------|
|This is the first text row | Still the first row | - Not sure how to
terminate here
|This is the second text row | Still second | before conversion.
|-----------------------------|---------------------|
|This would be table row 2 | and so on |
|Table row 2, text row 4 | and so on |
|-----------------------------|---------------------|

Thanks,

Ed


  #2   Report Post  
Posted to microsoft.public.word.tables
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default Two rows per row?

I think what you're asking is whether you can create a two-column table out
of two-line text paragraphs, separating at the line break. I suspect not.
Replace the line break (^l) with a paragraph break (^p) and then convert
text to table, separating at paragraph breaks, but forcing a two-column
table.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Ed Sheehan" wrote in message
...
I have a bunch of rows with every other row terminated by a CR. The

previous
row is terminated by a manual line break. Can I convert text to table and
have the two rows occupy one table row, with the end of the first row
holding a soft return?

I can manipulate these characters into something else if needed.

|-----------------------------|---------------------|
|This is the first text row | Still the first row | - Not sure how to
terminate here
|This is the second text row | Still second | before

conversion.
|-----------------------------|---------------------|
|This would be table row 2 | and so on |
|Table row 2, text row 4 | and so on |
|-----------------------------|---------------------|

Thanks,

Ed



  #3   Report Post  
Posted to microsoft.public.word.tables
Ed Sheehan Ed Sheehan is offline
external usenet poster
 
Posts: 14
Default Two rows per row?

What I an trying for is to flow two text rows into one table row. I already
have 4 columns defined via embedded tabs. It's just that the two rows are
related so I want them in their own table rows.

So if I have 100 text rows, I would end up with 50 table rows, each with two
rows of text inside, for all 4 columns.

Sorry if I'm explaining this badly.

Ed

"Suzanne S. Barnhill" wrote in message
...
I think what you're asking is whether you can create a two-column table out
of two-line text paragraphs, separating at the line break. I suspect not.
Replace the line break (^l) with a paragraph break (^p) and then convert
text to table, separating at paragraph breaks, but forcing a two-column
table.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup
so
all may benefit.

"Ed Sheehan" wrote in message
...
I have a bunch of rows with every other row terminated by a CR. The

previous
row is terminated by a manual line break. Can I convert text to table and
have the two rows occupy one table row, with the end of the first row
holding a soft return?

I can manipulate these characters into something else if needed.

|-----------------------------|---------------------|
|This is the first text row | Still the first row | - Not sure how to
terminate here
|This is the second text row | Still second | before

conversion.
|-----------------------------|---------------------|
|This would be table row 2 | and so on |
|Table row 2, text row 4 | and so on |
|-----------------------------|---------------------|

Thanks,

Ed





  #4   Report Post  
Posted to microsoft.public.word.tables
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default Two rows per row?

In other words, you basically have a table created with tabs, as follows:

Field 1tabField 2tabField 3tabField 4line break
Field 1tabField 2tabField 3tabField 4paragraph break

Field 1tabField 2tabField 3tabField 4line break
Field 1tabField 2tabField 3tabField 4paragraph break

Field 1tabField 2tabField 3tabField 4line break
Field 1tabField 2tabField 3tabField 4paragraph break

There's undoubtedly a way to do this programmatically, but I think I would
be inclined to start by converting to a four-column table, separating at
tabs. If the line breaks cause an issue, convert them to paragraph breaks
first. Then merge cells vertically to group each pair of entries, using F4
to repeat the operation. Or create the groups visually using line spacing
and application or omission of cell borders.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Ed Sheehan" wrote in message
...
What I an trying for is to flow two text rows into one table row. I

already
have 4 columns defined via embedded tabs. It's just that the two rows are
related so I want them in their own table rows.

So if I have 100 text rows, I would end up with 50 table rows, each with

two
rows of text inside, for all 4 columns.

Sorry if I'm explaining this badly.

Ed

"Suzanne S. Barnhill" wrote in message
...
I think what you're asking is whether you can create a two-column table

out
of two-line text paragraphs, separating at the line break. I suspect

not.
Replace the line break (^l) with a paragraph break (^p) and then convert
text to table, separating at paragraph breaks, but forcing a two-column
table.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the

newsgroup
so
all may benefit.

"Ed Sheehan" wrote in message
...
I have a bunch of rows with every other row terminated by a CR. The

previous
row is terminated by a manual line break. Can I convert text to table

and
have the two rows occupy one table row, with the end of the first row
holding a soft return?

I can manipulate these characters into something else if needed.

|-----------------------------|---------------------|
|This is the first text row | Still the first row | - Not sure how

to
terminate here
|This is the second text row | Still second | before

conversion.
|-----------------------------|---------------------|
|This would be table row 2 | and so on |
|Table row 2, text row 4 | and so on |
|-----------------------------|---------------------|

Thanks,

Ed






  #5   Report Post  
Posted to microsoft.public.word.tables
Lene Fredborg Lene Fredborg is offline
external usenet poster
 
Posts: 1,291
Default Two rows per row?

I understood the explanation in the same way as explained by Suzanne in the
latest post. If this is correct, I think that the macro below will convert
your text to a table the way you want.

Copy the macro and paste it into your Visual Basic editor. Before executing
it, you must select _all_ the text you want to include in the table.

The macro converts the text to a table with 4 columns (separated by your
tabs). Then it merges cells two and two in order to have your two related
lines inserted in the same table cell. You may need to change table borders,
column widths, etc. afterwards.

Sub ConvertToTable()
Dim oTable As Table
Dim n As Long
Dim i As Long

Set oTable = Selection.ConvertToTable(Separator:=vbTab, numcolumns:=4)
With oTable
For n = 1 To .Rows.Count / 2
For i = 1 To 4
.Cell(n, i).Range.Select
Selection.MoveDown Unit:=wdLine, Count:=1, Extend:=wdExtend
Selection.Cells.Merge
Next i
Next n
.Cell(1, 1).Select
End With
set otable = nothing
End Sub

--
Regards
Lene Fredborg
DocTools €“ Denmark
www.thedoctools.com
Document automation €“ add-ins, macros and templates for Microsoft Word


"Suzanne S. Barnhill" wrote:

In other words, you basically have a table created with tabs, as follows:

Field 1tabField 2tabField 3tabField 4line break
Field 1tabField 2tabField 3tabField 4paragraph break

Field 1tabField 2tabField 3tabField 4line break
Field 1tabField 2tabField 3tabField 4paragraph break

Field 1tabField 2tabField 3tabField 4line break
Field 1tabField 2tabField 3tabField 4paragraph break

There's undoubtedly a way to do this programmatically, but I think I would
be inclined to start by converting to a four-column table, separating at
tabs. If the line breaks cause an issue, convert them to paragraph breaks
first. Then merge cells vertically to group each pair of entries, using F4
to repeat the operation. Or create the groups visually using line spacing
and application or omission of cell borders.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Ed Sheehan" wrote in message
...
What I an trying for is to flow two text rows into one table row. I

already
have 4 columns defined via embedded tabs. It's just that the two rows are
related so I want them in their own table rows.

So if I have 100 text rows, I would end up with 50 table rows, each with

two
rows of text inside, for all 4 columns.

Sorry if I'm explaining this badly.

Ed

"Suzanne S. Barnhill" wrote in message
...
I think what you're asking is whether you can create a two-column table

out
of two-line text paragraphs, separating at the line break. I suspect

not.
Replace the line break (^l) with a paragraph break (^p) and then convert
text to table, separating at paragraph breaks, but forcing a two-column
table.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the

newsgroup
so
all may benefit.

"Ed Sheehan" wrote in message
...
I have a bunch of rows with every other row terminated by a CR. The
previous
row is terminated by a manual line break. Can I convert text to table

and
have the two rows occupy one table row, with the end of the first row
holding a soft return?

I can manipulate these characters into something else if needed.

|-----------------------------|---------------------|
|This is the first text row | Still the first row | - Not sure how

to
terminate here
|This is the second text row | Still second | before
conversion.
|-----------------------------|---------------------|
|This would be table row 2 | and so on |
|Table row 2, text row 4 | and so on |
|-----------------------------|---------------------|

Thanks,

Ed









  #6   Report Post  
Posted to microsoft.public.word.tables
Ed Sheehan Ed Sheehan is offline
external usenet poster
 
Posts: 14
Default Two rows per row?

Thanks Lene,

While I was parsing the rows, I discovered that some row "groupings" consist
of three rows. As I read your macro, do I interpret it correctly that it
uses a counter to mathematically arrive at an 'every other row' scheme? If
so, I wonder if it would be possible to group/merge the rows by looking for
a carriage return to establish a new table row.

Thanks very much for the macro. I'll give it a try.

Ed

"Lene Fredborg" wrote in message
...
I understood the explanation in the same way as explained by Suzanne in the
latest post. If this is correct, I think that the macro below will convert
your text to a table the way you want.

Copy the macro and paste it into your Visual Basic editor. Before
executing
it, you must select _all_ the text you want to include in the table.

The macro converts the text to a table with 4 columns (separated by your
tabs). Then it merges cells two and two in order to have your two related
lines inserted in the same table cell. You may need to change table
borders,
column widths, etc. afterwards.

Sub ConvertToTable()
Dim oTable As Table
Dim n As Long
Dim i As Long

Set oTable = Selection.ConvertToTable(Separator:=vbTab, numcolumns:=4)
With oTable
For n = 1 To .Rows.Count / 2
For i = 1 To 4
.Cell(n, i).Range.Select
Selection.MoveDown Unit:=wdLine, Count:=1, Extend:=wdExtend
Selection.Cells.Merge
Next i
Next n
.Cell(1, 1).Select
End With
set otable = nothing
End Sub

--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word


"Suzanne S. Barnhill" wrote:

In other words, you basically have a table created with tabs, as follows:

Field 1tabField 2tabField 3tabField 4line break
Field 1tabField 2tabField 3tabField 4paragraph break

Field 1tabField 2tabField 3tabField 4line break
Field 1tabField 2tabField 3tabField 4paragraph break

Field 1tabField 2tabField 3tabField 4line break
Field 1tabField 2tabField 3tabField 4paragraph break

There's undoubtedly a way to do this programmatically, but I think I
would
be inclined to start by converting to a four-column table, separating at
tabs. If the line breaks cause an issue, convert them to paragraph breaks
first. Then merge cells vertically to group each pair of entries, using
F4
to repeat the operation. Or create the groups visually using line spacing
and application or omission of cell borders.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup
so
all may benefit.

"Ed Sheehan" wrote in message
...
What I an trying for is to flow two text rows into one table row. I

already
have 4 columns defined via embedded tabs. It's just that the two rows
are
related so I want them in their own table rows.

So if I have 100 text rows, I would end up with 50 table rows, each
with

two
rows of text inside, for all 4 columns.

Sorry if I'm explaining this badly.

Ed

"Suzanne S. Barnhill" wrote in message
...
I think what you're asking is whether you can create a two-column
table

out
of two-line text paragraphs, separating at the line break. I suspect

not.
Replace the line break (^l) with a paragraph break (^p) and then
convert
text to table, separating at paragraph breaks, but forcing a
two-column
table.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the

newsgroup
so
all may benefit.

"Ed Sheehan" wrote in message
...
I have a bunch of rows with every other row terminated by a CR. The
previous
row is terminated by a manual line break. Can I convert text to
table

and
have the two rows occupy one table row, with the end of the first
row
holding a soft return?

I can manipulate these characters into something else if needed.

|-----------------------------|---------------------|
|This is the first text row | Still the first row | - Not sure
how

to
terminate here
|This is the second text row | Still second | before
conversion.
|-----------------------------|---------------------|
|This would be table row 2 | and so on |
|Table row 2, text row 4 | and so on |
|-----------------------------|---------------------|

Thanks,

Ed









  #7   Report Post  
Posted to microsoft.public.word.tables
Ed Sheehan Ed Sheehan is offline
external usenet poster
 
Posts: 14
Default Two rows per row?

Yeah, I was hoping to avoid going thru those steps 1,500 times. Since one
can merely press Enter in a cell to create an embedded new row, I thought
there might be a tag or something I could embed to create the same effect in
conversion. But, I guess not. Also, if you do it manually, then convert
table to text, then text to table, you'll lose the groupings, so Word
doesn't preserve that info thru the conversion procedure either.

I may need to rethink the double row deal and maybe scrunch it together on
the same row.

Thanks for your help,

Ed


"Suzanne S. Barnhill" wrote in message
...
In other words, you basically have a table created with tabs, as follows:

Field 1tabField 2tabField 3tabField 4line break
Field 1tabField 2tabField 3tabField 4paragraph break

Field 1tabField 2tabField 3tabField 4line break
Field 1tabField 2tabField 3tabField 4paragraph break

Field 1tabField 2tabField 3tabField 4line break
Field 1tabField 2tabField 3tabField 4paragraph break

There's undoubtedly a way to do this programmatically, but I think I would
be inclined to start by converting to a four-column table, separating at
tabs. If the line breaks cause an issue, convert them to paragraph breaks
first. Then merge cells vertically to group each pair of entries, using F4
to repeat the operation. Or create the groups visually using line spacing
and application or omission of cell borders.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup
so
all may benefit.

"Ed Sheehan" wrote in message
...
What I an trying for is to flow two text rows into one table row. I

already
have 4 columns defined via embedded tabs. It's just that the two rows are
related so I want them in their own table rows.

So if I have 100 text rows, I would end up with 50 table rows, each with

two
rows of text inside, for all 4 columns.

Sorry if I'm explaining this badly.

Ed

"Suzanne S. Barnhill" wrote in message
...
I think what you're asking is whether you can create a two-column table

out
of two-line text paragraphs, separating at the line break. I suspect

not.
Replace the line break (^l) with a paragraph break (^p) and then
convert
text to table, separating at paragraph breaks, but forcing a two-column
table.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the

newsgroup
so
all may benefit.

"Ed Sheehan" wrote in message
...
I have a bunch of rows with every other row terminated by a CR. The
previous
row is terminated by a manual line break. Can I convert text to table

and
have the two rows occupy one table row, with the end of the first row
holding a soft return?

I can manipulate these characters into something else if needed.

|-----------------------------|---------------------|
|This is the first text row | Still the first row | - Not sure how

to
terminate here
|This is the second text row | Still second | before
conversion.
|-----------------------------|---------------------|
|This would be table row 2 | and so on |
|Table row 2, text row 4 | and so on |
|-----------------------------|---------------------|

Thanks,

Ed








  #8   Report Post  
Posted to microsoft.public.word.tables
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default Two rows per row?

1,500? You have 50 row pairs, each with four columns. I make that 200. Not
that I'd want to do it that many times, either.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Ed Sheehan" wrote in message
...
Yeah, I was hoping to avoid going thru those steps 1,500 times. Since one
can merely press Enter in a cell to create an embedded new row, I

thought
there might be a tag or something I could embed to create the same effect

in
conversion. But, I guess not. Also, if you do it manually, then convert
table to text, then text to table, you'll lose the groupings, so Word
doesn't preserve that info thru the conversion procedure either.

I may need to rethink the double row deal and maybe scrunch it together on
the same row.

Thanks for your help,

Ed


"Suzanne S. Barnhill" wrote in message
...
In other words, you basically have a table created with tabs, as

follows:

Field 1tabField 2tabField 3tabField 4line break
Field 1tabField 2tabField 3tabField 4paragraph break

Field 1tabField 2tabField 3tabField 4line break
Field 1tabField 2tabField 3tabField 4paragraph break

Field 1tabField 2tabField 3tabField 4line break
Field 1tabField 2tabField 3tabField 4paragraph break

There's undoubtedly a way to do this programmatically, but I think I

would
be inclined to start by converting to a four-column table, separating at
tabs. If the line breaks cause an issue, convert them to paragraph

breaks
first. Then merge cells vertically to group each pair of entries, using

F4
to repeat the operation. Or create the groups visually using line

spacing
and application or omission of cell borders.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the

newsgroup
so
all may benefit.

"Ed Sheehan" wrote in message
...
What I an trying for is to flow two text rows into one table row. I

already
have 4 columns defined via embedded tabs. It's just that the two rows

are
related so I want them in their own table rows.

So if I have 100 text rows, I would end up with 50 table rows, each

with
two
rows of text inside, for all 4 columns.

Sorry if I'm explaining this badly.

Ed

"Suzanne S. Barnhill" wrote in message
...
I think what you're asking is whether you can create a two-column

table
out
of two-line text paragraphs, separating at the line break. I suspect

not.
Replace the line break (^l) with a paragraph break (^p) and then
convert
text to table, separating at paragraph breaks, but forcing a

two-column
table.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the

newsgroup
so
all may benefit.

"Ed Sheehan" wrote in message
...
I have a bunch of rows with every other row terminated by a CR. The
previous
row is terminated by a manual line break. Can I convert text to

table
and
have the two rows occupy one table row, with the end of the first

row
holding a soft return?

I can manipulate these characters into something else if needed.

|-----------------------------|---------------------|
|This is the first text row | Still the first row | - Not sure

how
to
terminate here
|This is the second text row | Still second | before
conversion.
|-----------------------------|---------------------|
|This would be table row 2 | and so on |
|Table row 2, text row 4 | and so on |
|-----------------------------|---------------------|

Thanks,

Ed









Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying 200 default rows from excel print 74 only in word. Adjusting TOCto reflect page numbering Microsoft Word Help 3 September 20th 06 03:28 AM
Header Rows in Table Won't Repeat Idaho Word Man Microsoft Word Help 1 August 3rd 06 01:10 AM
Tables: rows not allowed to break over pages. [email protected] Tables 2 July 18th 06 04:26 PM
Problem pasting landscape table rows [email protected] Page Layout 4 June 30th 06 11:01 AM
Top two rows to be heading rows, one keeps turning off [email protected] Tables 1 December 31st 05 03:51 PM


All times are GMT +1. The time now is 06:09 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"