Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to do a find and replace on part of a document?
I am trying to remove index fields on part of a document. I don't want all
the sections to be indexed and because when I was indexing and hit "mark all" it indexed sections that I did not want coded for indexing. So I need it to stop at the end of a section when I repace all. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to do a find and replace on part of a document?
As with all Replace All functions, best to test ON A COPY--but if you
select the part of the text you want searched, Replace All should only affect that part, and then ask you if you want to do the rest of the document. Thomas FG Gilbert wrote: I am trying to remove index fields on part of a document. I don't want all the sections to be indexed and because when I was indexing and hit "mark all" it indexed sections that I did not want coded for indexing. So I need it to stop at the end of a section when I repace all. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to do a find and replace on part of a document?
The following macro will remove the index fields from the section the cursor
is in ActiveDocument.Bookmarks("\section").Range.Select Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "^d INDEX" .Replacement.Text = "" .Forward = True .Wrap = wdFindStop .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute replace:=wdReplaceAll http://www.gmayor.com/installing_macro.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Thomas FG Gilbert wrote: I am trying to remove index fields on part of a document. I don't want all the sections to be indexed and because when I was indexing and hit "mark all" it indexed sections that I did not want coded for indexing. So I need it to stop at the end of a section when I repace all. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find multiple characters in one find using MSword find/replace | Microsoft Word Help | |||
Trying to replace words with fields using Find/Replace | Microsoft Word Help | |||
Using find and replace or macros to replace page ranges | Microsoft Word Help | |||
Find/ Replace is auto-capping the words I want to replace with | Microsoft Word Help | |||
Find/replace for tabs in a Word document | Microsoft Word Help |