View Single Post
  #3   Report Post  
Posted to microsoft.public.word.tables
Jules[_3_] Jules[_3_] is offline
external usenet poster
 
Posts: 58
Default macros for tables (2007)

Nice macro Steven.

If you select your second column and hit the layout tab and select split
cells it does what you require with Developer Tab on or off.

"StevenM" stevencraigmiller(at)comcast(dot)net wrote in message
...
To: Aedcone,

I'm not following you. I think if you clarified your problem, you might
find
someone posting an answer faster.

For example, you stated that you had a table with over 200 rows with text
in
it.
Then you added a second column. Is the second column empty or does it have
text in it too?

The you stated that you needed to split the cells in the second column and
create two rows. Yes?

Now, if I'm understanding you here, the first column has over 200 rows, so
does that mean you want the second column to have over 400 rows? So that
for
each row in column one, there will be two rows in column two?

For example, do you need a table which looks something like:

Sub TableSplitRows()
Dim newDoc As Document
Dim oRange As Range
Dim oTable As Table

Set newDoc = Documents.Add
Set oRange = newDoc.Range
Set oTable = newDoc.Tables.Add(oRange, NumRows:=2, NumColumns:=2)
oTable.Columns(2).Cells(2).Split NumRows:=2
oTable.Columns(2).Cells(1).Split NumRows:=2
End Sub

Steven Craig Miller

"aedcone" wrote:

I have table that consists of over 200 rows with text already in it.
I've
added a second column. I now need to split the cells in the second colum
into two rows... This is to create a pedigree chart of sorts... I want
to
create a macro to do this, but I can't seem to start the macro for
anything... Normally, I would right click in the cell, select split
table,
change the column to 1, the rows to 2. This is macro I need to create,
but
it won't let met right click in the cell whilst I have the "developer"
tab
up, and when i go to the Insert table and select table, I don't get the
menu
to split the table...

Help is needed asap... as it is, it's a big PIA to do this cell by
cell...
and I thought a macro would help...

TIA