>The easiest way that I've found to figure out what code is needed to do a specific task in Word is to record a macro of yourself doing that specific task and then view the resulting macro (VBA) code and replace the non-dynamic elements with whatever dynamic elements you want to add to the script.
>
>If you're using OLE to control Word from VB, then "most" of the time the VBA scripting code that Word generates can be "cut and pasted" into your VB app.
Good idea.
Selecting all the text and selecting the Search/Replace dialog resulted in the following code:
Selection.WholeStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "orgiginal"
.Replacement.Text = "modified"
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
This should work in vb if you apply it to a Word object.