Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.tables
|
|||
|
|||
rows in tables 2007
How do I insert a specified number of rows in tables in word 2007 without
having to select the number of ros in the existing table ie 20 rows to the end of a table |
#2
Posted to microsoft.public.word.tables
|
|||
|
|||
rows in tables 2007
If you run a macro containing the following code, it will ask you how many
rows you want to add to the end of table in which the selection is located. Dim i As Long If Selection.Information(wdWithInTable) Then For i = 1 To InputBox("Enter the number of rows that you want to add") Selection.Tables(1).Rows.Add Next i Else MsgBox "The selection must be inside the table to which you want to add the rows." End If If you want them added before the row in which the selection is located, use Dim i As Long If Selection.Information(wdWithInTable) Then For i = 1 To InputBox("Enter the number of rows that you want to add") Selection.Tables(1).Rows.Add Selection.Rows(1) Next i Else MsgBox "The selection must be inside the table to which you want to add the rows." End If -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "Billj" wrote in message ... How do I insert a specified number of rows in tables in word 2007 without having to select the number of ros in the existing table ie 20 rows to the end of a table |
#3
Posted to microsoft.public.word.tables
|
|||
|
|||
rows in tables 2007
Thank you very much, will see how we go.
"Doug Robbins - Word MVP on news.microsof" wrote: If you run a macro containing the following code, it will ask you how many rows you want to add to the end of table in which the selection is located. Dim i As Long If Selection.Information(wdWithInTable) Then For i = 1 To InputBox("Enter the number of rows that you want to add") Selection.Tables(1).Rows.Add Next i Else MsgBox "The selection must be inside the table to which you want to add the rows." End If If you want them added before the row in which the selection is located, use Dim i As Long If Selection.Information(wdWithInTable) Then For i = 1 To InputBox("Enter the number of rows that you want to add") Selection.Tables(1).Rows.Add Selection.Rows(1) Next i Else MsgBox "The selection must be inside the table to which you want to add the rows." End If -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "Billj" wrote in message ... How do I insert a specified number of rows in tables in word 2007 without having to select the number of ros in the existing table ie 20 rows to the end of a table |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Word 2007 tables - adding multiple rows | Microsoft Word Help | |||
How can I swap rows and columns in Word 2007 tables? | Tables | |||
tables and rows | Microsoft Word Help | |||
'Tables'- 2 columns,4 rows. Can you merge one column into 3 rows? | Tables | |||
Repeating rows within tables - not heading rows | Tables |