I need to format (hidden) all paragraphs starting with a certain word. I have used find-replace
'----set replacement format
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.font
.Size = 9
.Color = wdColorTurquoise colour
.Hidden = True
End With
'----"COMPARE" AT START OF LINE
With Selection.Find
.text = "^13Compare: *^13" 'TODO: need to apply format to PART-exclude 1st para mark!
.Replacement.text = "" 'keeps original string, just applies repl format to it
.Forward = True
.Wrap = wdFindStop
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
To find them, I have to search for "^13String*^13"
, to avoid the same string in other places.
But if I hide the whole find string, the paragraph mark at the end of the preceding paragraph is lost.
Is there a way to change the format of everything except the first ^13?