You didn't include your code.
I would suggest instead of deleting rows\columns from the Word doc, it would be easier to copy only the cells with data instead of a fixed size range. There are several methods to define used cell areas in VBA depending on the nature of your data. Below are two examples to copy only the rows with data from sheet 1
Here's a very good guide with other examples. If you do a web search, you can find several more guides.![]()
Sub Copy_Table1() With Sheets("Sheet1") .Range("A1", .Range("A9").End(xlUp)).Resize(, 7).Copy 'columns A:G End With End Sub Sub Copy_Table2() With Sheets("Sheet1") .Range("A9", .Range("A100").End(xlUp)).Resize(, 7).Copy 'columns A:G End With End Sub
Select Actual Used Range in Excel Sheet
Bookmarks