Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
Billj Billj is offline
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.word.tables
Doug Robbins - Word MVP on news.microsoft.com Doug Robbins - Word MVP on news.microsoft.com is offline
external usenet poster
 
Posts: 407
Default 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   Report Post  
Posted to microsoft.public.word.tables
Billj Billj is offline
external usenet poster
 
Posts: 2
Default 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

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 2007 tables - adding multiple rows rgille Microsoft Word Help 11 April 27th 23 08:57 AM
How can I swap rows and columns in Word 2007 tables? Meadow Tables 1 October 7th 07 09:37 AM
tables and rows george_b1004[_2_] Microsoft Word Help 5 April 10th 07 09:03 PM
'Tables'- 2 columns,4 rows. Can you merge one column into 3 rows? CalMac Captain Tables 1 May 19th 06 03:27 PM
Repeating rows within tables - not heading rows Eddie Tables 1 August 19th 05 03:24 PM


All times are GMT +1. The time now is 02:28 PM.

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"