![]() |
|
#6
|
||||
|
||||
|
Hi Michael,
You could keep adding: .Text = "Stringtofind" .Execute Replace:=wdReplaceAll expressions before the 'End With' line, or you could use code like: Code:
Sub ColourChange()
Application.ScreenUpdating = False
Dim arrWords, i As Long
arrWords = Array("FQCN73", "2nd string", "3rd string")
With ActiveDocument.Content.Find
.ClearFormatting
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
With .Replacement
.ClearFormatting
.Text = "^&"
.Font.Color = wdColorRed
End With
For i = 0 To UBound(arrWords)
.Text = arrWords(i)
.Execute Replace:=wdReplaceAll
Next
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| "Change Word Options" don't change | ADKREV | Word | 0 | 11-12-2010 10:56 AM |
| How to make styles defined in one document available to ALL other documents, period. | wornways | Word | 1 | 08-05-2010 09:09 PM |
| Change Default Font Word | datuk.ahmad | Word | 3 | 03-09-2010 04:47 PM |
| TOC printing Error Bookmark not Defined | techexpressinc | Word | 0 | 12-14-2008 05:24 PM |
Defined Views in Tasks
|
Inga | Office | 3 | 07-20-2005 07:10 AM |