I am doing a string search within a open Word Document. I know string exist in the document but my comparison is telling me that it can not find it. Could someone shed some light as to what I could be doing wrong?
Private Sub InsertSymbol(RedStrikeText)
With ActiveDocument.Content.Find
.ClearFormatting
.Text = RedStrikeText
.Execute
If .Found = True Then
With .Replacement
.ClearFormatting
Dim NewRedStrikeText As String
NewRedStrikeText = "[&" & RedStrikeText & "&]"
.Text = NewRedStrikeText
End With
.Execute Replace:=wdReplaceAll
End If
End With
End Sub
Private Sub InsertSymbol(RedStrikeText)
With ActiveDocument.Content.Find
.ClearFormatting
.Text = RedStrikeText
.Execute
If .Found = True Then
With .Replacement
.ClearFormatting
Dim NewRedStrikeText As String
NewRedStrikeText = "[&" & RedStrikeText & "&]"
.Text = NewRedStrikeText
End With
.Execute Replace:=wdReplaceAll
End If
End With
End Sub