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 8966983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:08:28+00:00 2026-06-15T17:08:28+00:00

Basically, what I’m trying to accomplish is this: Delete all rows from a table

  • 0

Basically, what I’m trying to accomplish is this: Delete all rows from a table starting from where the cursor is in the table to the end of the table.

The problem is that this table contains vertically merged cells, so when I try to do something like this:

For i = Selection.Tables(1).Rows.Count To Selection.Cells(1).RowIndex Step -1
    Selection.Tables(1).Rows(i).Delete
Next

It complains that individual rows cannot be accessed because the table contains vertically merged cells.

I’ve also tried selecting the range first, and then deleting the selection. But I couldn’t get the range definition right; it always complained that there was an improperly defined parameter.

  • 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-15T17:08:29+00:00Added an answer on June 15, 2026 at 5:08 pm

    Aren’t merged table cells just a pain in the rear with VBA? Word seems to get confused with the column and row count. The follow seems to be pretty robust with any combination of horizontally or vertically merged cells.

    Sub DeleteRows()
    
        Selection.MoveDown Unit:=wdLine, Count:=(Selection.Tables(1).Rows.Count - Selection.Cells(1).RowIndex), Extend:=wdExtend
        Selection.Rows.Delete
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically from a database I am getting data that is formatted like this nameofproject101
Basically I'm attempting to add rows to a table, I need to do this
Basically what i am trying to do here is to read from the table
Basically I'm trying to accomplish the same thing that mailto:bgates@microsoft.com does in Internet Explorer
Basically from C++ FAQ I learned that: A virtual function allows derived classes to
Basically this function is meant to store the height value of the element that
Basically I am trying to do this: <Trigger Property=Item Value={c:CollectionView.NewItemPlaceHolder}> But the syntax is
Basically I just need the effect of copying that HTML from browser window and
Basically, what signal does '0' represent, because here I see SIGNAL numbers starting from
Basically I have an iframe loaded that is accessed from the parent whenever it

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.