Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9218821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:57:09+00:00 2026-06-18T02:57:09+00:00

I needed to insert multiple copies of a group of rows formatted as shown

  • 0

I needed to insert multiple copies of a group of rows formatted as shown below.

+-------------------------------------------------+
|                       1,1                       |
+-------------------------------------------------+
|         |   2,2   |         |   2,4   |         |
|   2,1   +---------+   2,3   +---------+   2,5   |
|         |   3,2   |         |   3,4   |         |
+-------------------------------------------------+
|                       4,1                       |
+-------------------------------------------------+
|         |   5,2   |         |   5,4   |         |
|   5,1   +---------+   5,3   +---------+   5,5   |
|         |   6,2   |         |   6,4   |         |
+-------------------------------------------------+

In case A, I needed multiple copies of rows 1-3 inserted before row 4.

In case B, I needed multiple copies of rows 4-6 inserted at the end of the table.

The table.rows(n) method doesn’t work and gives the following error :

Run-time error ‘5991’:

Cannot access individual rowsin this collection because the table has vertically merged cells

However, one can do this from the user interface, so it must be possible!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:57:10+00:00Added an answer on June 18, 2026 at 2:57 am

    Here is how I overcame the problem (tested in Word 2007 and Word 2003)

    Sub CaseA()
    
        Dim D As Document, T As Table
    
        Set D = ActiveDocument
    
        Set T = D.Tables(1)     '   select the first table in the document
                    '   select from the start of row 1 to the start of row 4
        D.Range(T.Cell(2, 1).Range.Start, T.Cell(4, 1).Range.Start).Select
    
        Selection.Copy          '   copy the rows
                                '   move the insertion point to the start of row 4
        Selection.Collapse wdCollapseEnd 
    
        Selection.Paste         '   insert a copy
                                        '   (can do this as many times as you want)
    
    End Sub
    
    Sub CaseB()
    
        Dim D As Document, T As Table
    
        Set D = ActiveDocument
    
        Set T = D.Tables(1)
    ' select from the start of row 5 to the end of the last cell present in row 6
    ' plus 1 character for column 5 plus 1 character to move outside the table
        D.Range(T.Cell(5, 1).Range.Start, T.Cell(6, 4).Range.End + 2).Select
    
        Selection.Copy          '   copy the rows
                                '   move the insertion point just outside the table
        Selection.Collapse wdCollapseEnd
    
        Selection.Paste         '   insert a copy
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to insert a row into a table which references keys in other
MS SQL Server doesn't have row level triggers, correct? If I needed to insert
I want to insert multiple rows of data in a single column using a
bash master needed... To compare mysqldumps from multiple dates, I need sql GROUP BY,
I have to insert three tables independently .. but if first table is inserted
I needed to store arbitrary data in a relational database of multiple data-types so
I have a table with a row that looks like this: ( 20091231 48498429,
I'm stuck. I implemented all steps needed to insert new DB values from a
Code output needed: Visual Output : My sql Database 'test' CREATE TABLE IF NOT
I'm attempting to cut down on the amount of PHP code needed to insert

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.