I need to apply typebackspace to every paragraph, when
1. it is not empty
2. not containing symbols ■ and ★
e.g. ( each line represents a paragraph )
The original document looks like:
■ ******
***xx
★******xx
***x
■ *********x
***xx xx
★*********x
***x ***
After VBA execution, it becomes:
■ *********xx
★************
■ *************** xx
★************xx ***
With Selection
For i = .Paragraphs.Count To 1 Step -1
'-------------------
If (InStr(1, .Paragraphs(i).Range.Text, "■") = 0) And (InStr(1, .Paragraphs(i).Range.Text, "★") = 0) And .Paragraphs(i).Range.Text <> "" Then
.Paragraphs(i).Range.Select
Selection.HomeKey
Selection.TypeBackspace
End If
'-------------------
Next
End Selection
But it returns error for the [B] [B/] line.
Please help.Thanks.