View Single Post
 
Old 10-27-2020, 10:18 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,106
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 of
Default

I suspect I might conditionally merge those fields that could be empty to add unique text instead e.g.

{ IF { MERGEFIELD SS_1 } = "" "BLANK" "{ MERGEFIELD SS_1 }" } etc.,

then run a macro to remove the rows that contain 'BLANK' in the first column e.g.
If you use https://www.gmayor.com/email_merge_addin.html to merge the documents, you can run the following macro from the process to remove the blanks on the fly.
Code:
Sub DelBlanks(oDoc As Document)
Dim oTable As Table
Dim iRow As Integer
Dim oCell As Range
    Set oTable = oDoc.Tables(1)
    For iRow = oTable.Rows.Count - 21 To 5 Step -1
        Set oCell = oTable.Cell(iRow, 1).Range
        oCell.End = oCell.End - 1
        If oCell.Text = "BLANK" Then oTable.Rows(iRow).Delete
    Next iRow
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