From your description, it seems to me all you need is:
Sub Duplicate_And_Replace() Application.ScreenUpdating = False Const sTEXT = "k=""ABCD""" Const sREPLACETEXT = "k=""EFGH""" With ActiveDocument.Range.Find .ClearFormatting .Replacement.ClearFormatting .Text = "([!^13]@)" & sTEXT & "([!^13]@^13)" .Replacement.Text = "\1" & sREPLACETEXT & "\2\1" & sTEXT & "\2" .Forward = True .Wrap = wdFindContinue .Format = False .MatchWildcards = True .Execute Replace:=wdReplaceAll End With Application.ScreenUpdating = True End Sub