Here is my issue,
I'm looking for ":"
and typing HTML code with VBA. The code below keeps looping at the same ":"
and does not move on to the next, since I'm not actually removing it. Any suggestions?
Dim bFound As Boolean
bFound = True
Set r = ActiveDocument.Content
r.Find.ClearFormatting
Do While bFound
With r.Find
.Text = ":"
.Replacement.Text = ":</b>"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
bFound = .Execute(Replace:=wdReplaceOne, Forward:=True)
End With
If bFound Then
r.Select
Selection.HomeKey Unit:=wdLine
Selection.TypeText Text:="<b>"
Selection.EndKey Unit:=wdLine
Selection.MoveRight
End If
Loop