![]() |
#2
|
||||
|
||||
![]()
You don't actually need a macro for what you've described; it could also be done with a wildcard Find/Replace, where:
Find = /Ex:*/Ex Replace = "^&" and you specify the replacement font colour. A macro equivalent is: Code:
Sub Demo() Application.ScreenUpdating = False With ActiveDocument.Range.Find .ClearFormatting .Replacement.ClearFormatting .Replacement.Font.ColorIndex = wdRed .Text = "/Ex:*/Ex" .Replacement.Text = "^&" .Format = True .Forward = True .Wrap = wdFindContinue .MatchWildcards = True .Execute Replace:=wdReplaceAll End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
changing the font color | dbsoccer | Project | 1 | 11-01-2013 06:21 AM |
changing color | aerospace | Outlook | 0 | 04-03-2013 05:56 AM |
Changing bar color automatically | Mahmuz | PowerPoint | 0 | 03-28-2012 11:49 PM |
Changing the margins on a specific paragraph | Xmosis | Word | 1 | 03-15-2011 02:04 PM |
changing font size without changing leading | carolns | Word | 1 | 09-14-2009 12:30 PM |