![]() |
#2
|
||||
|
||||
![]()
It would be a simple process to create a macro that checks each row. If you use my merge add-in E-Mail Merge Add-in to merge to separate documents, you could use the following macro to remove them on the fly
Code:
Sub ClearEmpty(oDoc As Document) Dim oTable As Table Dim iRow As Integer, iCol As Integer Dim bFound As Boolean With oDoc For Each oTable In oDoc.Tables If oTable.Columns.Count = 5 Then For iRow = oTable.Rows.Count To 2 Step -1 bFound = False For iCol = 2 To oTable.Rows(iRow).Cells.Count If Len(oTable.Rows(iRow).Cells(iCol).Range) > 2 Then bFound = True Exit For End If Next iCol If bFound = False Then oTable.Rows(iRow).Delete DoEvents Next iRow End If Next oTable End With End Sub Code:
Sub Macro1() ClearEmpty ActiveDocument End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Tags |
hide rows |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Removing duplicate rows when identical value in a column | ballpoint | Excel | 1 | 01-05-2018 08:54 AM |
how to delete every blank and non-numeric rows without removing the header | enuff | Excel | 3 | 08-24-2017 05:56 AM |
![]() |
hrhr3 | Mail Merge | 4 | 08-24-2016 07:37 PM |
![]() |
MessyJessy | Excel | 7 | 01-14-2015 01:38 AM |
![]() |
gib65 | Excel | 2 | 12-09-2011 02:09 PM |