I been struggling with a word macro that deletes Empty lines where a "$" exists. The code below works but only for the selected table, how can I have the code loop through the entire document and delete empty lines from all pages.
Option Explicit
Sub TEST()
Dim i As Long
With Selection.Tables(1)
For i = .Rows.Count To 1 Step -1
If Len(.Cell(i, 2).Range.Text) = 3 And Left(.Cell(i, 2).Range.Text, 1) = "$" Then
.Rows(i).Delete
End If
Next i
End With
End Sub