Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-10-2012, 08:57 PM
tinfanide tinfanide is offline Any "InsertRowsBelow" in Tables Object? Windows 7 64bit Any "InsertRowsBelow" in Tables Object? Office 2010 32bit
Expert
Any "InsertRowsBelow" in Tables Object?
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default Any "InsertRowsBelow" in Tables Object?


Code:
Sub t()

With ActiveDocument
    With .Tables(1)
        .Rows(.Rows.Last.Index).Select
        With Selection
            .InsertRowsBelow 1
        End With
        .Rows(.Rows.Last.Index).Range.Text = "newly added last row in this table"
    End With
End With

End Sub
There is
Code:
ActiveDocument.Tables(1).Rows.Add [BeforeRow As Row]
in the Tables Object. But just wonder if I can insert rows after a row.
Reply With Quote
  #2  
Old 06-11-2012, 04:29 AM
macropod's Avatar
macropod macropod is offline Any "InsertRowsBelow" in Tables Object? Windows 7 64bit Any "InsertRowsBelow" in Tables Object? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi tinfanide,

There is no equivalent to '.InsertRowsBelow' for the table object. However, you probably don't need it. To add a new last row, simply use:
ActiveDocument.Tables(1).Rows.Add
To insert a row after a specific row, use something like:
ActiveDocument.Tables(1).Rows(2).Range.Rows.Add
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 06-11-2012, 04:41 AM
tinfanide tinfanide is offline Any "InsertRowsBelow" in Tables Object? Windows 7 64bit Any "InsertRowsBelow" in Tables Object? Office 2010 32bit
Expert
Any "InsertRowsBelow" in Tables Object?
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default

A lovely one.
Never thought it was just simple as that.
Thank you.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Wierd symbols inplace of "space", "indentation" etc aka.bhagvanji Word 5 02-16-2012 11:50 AM
How to edit the "Format" and the "show level" of an EXISTING table of content? Jamal NUMAN Word 2 08-14-2011 10:46 AM
Any "InsertRowsBelow" in Tables Object? "Table of content" based on "Normal Style" behavior!!!! Jamal NUMAN Word 4 07-08-2011 04:12 AM
Any "InsertRowsBelow" in Tables Object? How to choose a "List" for certain "Heading" from "Modify" tool? Jamal NUMAN Word 2 07-03-2011 03:11 AM
"Microsoft Excel Application" missing in the "Component Services" on win08 sword.fish Excel 0 02-26-2010 02:09 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:04 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft