Here is a snippet of code that I have.
Dim w As Range
For Each w In ActiveDocument.Words
If InStr(1, w, "-<[lb]>") = 1 Then
w = Replace(w, "-<[lb]>", "")
w.Font.ColorIndex = 3 'for, say, RED
End If
Next
What I want to do is remove the dash and the hidden line break and replace it with nothing and color the word. For example if I have the word "pro-<[lb]>bably", note that this is what the word looks like when all hidden markers are showing. The problem is that it looks like my code is looking for that <[lb]> literally and doesn't find that condition at all. I want to end up with the word "probably" colored without the dash and the hidden line break. Is there a way to do this?
Thanks
Dim w As Range
For Each w In ActiveDocument.Words
If InStr(1, w, "-<[lb]>") = 1 Then
w = Replace(w, "-<[lb]>", "")
w.Font.ColorIndex = 3 'for, say, RED
End If
Next
What I want to do is remove the dash and the hidden line break and replace it with nothing and color the word. For example if I have the word "pro-<[lb]>bably", note that this is what the word looks like when all hidden markers are showing. The problem is that it looks like my code is looking for that <[lb]> literally and doesn't find that condition at all. I want to end up with the word "probably" colored without the dash and the hidden line break. Is there a way to do this?
Thanks