View Single Post
 
Old 03-25-2022, 03:57 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,138
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

There is no simple way to do this using out of the box mail merge to e-mail. You can however do it with E-Mail Merge Add-in if you run the following macro from the dialog:
Code:
Sub DelBlanks(oDoc As Document)
Dim oTable As Table
Dim oRow As Row
Dim oCell As Cell
Dim i As Long
Dim bTst As Boolean
    Set oTable = oDoc.Tables(1)
    For i = oTable.Rows.Count To 1 Step -1
        bTst = False
        Set oRow = oTable.Rows(i)
        For Each oCell In oRow.Cells
            If Len(oCell.Range) > 2 Then
                bTst = True
                Exit For
            End If
        Next oCell
        If bTst = False Then oRow.Delete
    Next i
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote