View Single Post
  #2   Report Post  
Doug Robbins
 
Posts: n/a
Default

You would need to use a bit of VBA code for this:

Dim myrange as Range
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
While .Execute(FindText:="some string", MatchWildcards:=False,
Wrap:=wdFindStop, Forward:=True) = True
Set myrange = Selection.Range
Code to add the field using ActiveDocument.Fields.Add myrange, etc
Wend
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
"Jeff Janoski" Jeff wrote in message
...
I would like to replace a text string with a field name throughout the
entire
document. The find/replace does not allow me to insert a field name. Is
there another way?