I'm looking for some help with VBA code to delete a line of text (which is also a paragraph.
I have a text document which I transalated into another language, putting the translation line immediately beneath the English. Thus, there is basically a line of English followed by a line of Spanish, followed by a line of English and so on. At the end of each line there is a carriage return.
So that the document can be understood more easily, the Spanish lines are in Blue.
So far, This is what I have come up with, but it is not doing the job
Sub RemoveBlueText()
' Find all text in blue and delete
Dim curCharIndex As Integer
Dim charCount As Integer
curCharIndex = 1
charCount = ActiveDocument.Characters.Count
While curCharIndex <= charCount
ActiveDocument.Characters(curCharIndex).Select
If Selection.Font.Color = Blue Then
Selection.Delete
charCount = charCount - 1
Else
'Skip it
curCharIndex = curCharIndex + 1
End If
Wend
End Sub