Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
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? |
#2
![]() |
|||
|
|||
![]()
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? |
#3
![]() |
|||
|
|||
![]()
Type the field in the document, copy it to the clipboard, then replace your
text with the content of the clipboard (^c). -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Jeff Janoski wrote: 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? |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I find & replace "text form fields"? | Microsoft Word Help | |||
Problem with function "Find and Replace" in Word. | Microsoft Word Help | |||
I want to replace black text with a different text of another colo | Microsoft Word Help | |||
Find and Replace anomaly | Microsoft Word Help | |||
change all caps in text to small lettering using find and replace. | New Users |