View Single Post
 
Old 11-21-2020, 03:03 AM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2010
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

No, that's not possible, because the tables concerned don't exist in a populated form until after the merge has completed. Instead, the code could be re-written to process every nth table. For example:
Code:
Sub MailMergeToDoc()
Application.ScreenUpdating = False
Dim t As Long, r As Long
ActiveDocument.MailMerge.Execute
With ActiveDocument
  For t = 1 To .Tables.Count Step 2
    With .Tables(t)
      For r = .Rows.Count To 3 Step -1
        With .Rows(r)
          If Len(.Cells(2).Range.Text) = 2 Then .Delete
        End With
      Next
    End With
  Next
End With
Application.ScreenUpdating = False
End Sub
where the '1' indicates the table to start at, and the '2' indicates that every second table from the table to start at is to be processed. Thus, as coded, the 1st, 3rd, 5th, etc. tables would be processed.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]