Hi,

I'm facing a problem with my code. I'm using an excel macro which will find a particular word in Word Document and replace with other word.

TextToFind = "Limits"

        Set rng = objWord.ActiveDocument.Content
        rng.Find.Execute FindText:=TextToFind, MatchCase:=True, Forward:=True
        rng.Find.Execute ReplaceWith:="LOE"
and after this is done i want to again replace back to old word. so i'm using following code.

TextToFind = "LOE"

        Set rng = objWord.ActiveDocument.Content
        rng.Find.Execute FindText:=TextToFind, MatchCase:=True, Forward:=True
        rng.Find.Execute ReplaceWith:="Limits"
In simple words i'm reverting back. But "ReplaceWith" is unable to replace "LOE" to "Limits"

Any idea why is it so. Am i missing something here. Please help. Thanks in advance