![]() |
#1
|
|||
|
|||
![]()
Hello! I have bulleted text that I run many macros on and they change the words different colors depending on what they find.
What I am trying to do now with a macro is what I am doing manually: look for every line that is just wdAutomatic black. No other colors. If it's just black, that line of text requires more work so that one of the other macros will catch it. Here is the code I started, but it's missing the "loop through all the lines on the page" part. ![]() <code> Sub JustBlack() ' ' JustBlack Macro: If the line only has black text and no other colors, then highlight that line yellow. ' Selection.Find.Execute Selection.Find.ClearFormatting Selection.Find.Font.Color = wdColorAutomatic With Selection.Find .Text = "" .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = True .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Range.HighlightColorIndex = wdYellow End Sub </code> I appreciate your help!! ![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Cendrinne | Word VBA | 12 | 11-08-2020 11:05 PM |
![]() |
dmarie123 | Word VBA | 10 | 07-20-2015 12:16 AM |
![]() |
norgro | Word VBA | 3 | 02-18-2013 05:14 PM |
How to import a text file but skip the first line regardless of characters? | omahadivision | Excel Programming | 7 | 02-01-2013 08:30 PM |
![]() |
14spar15 | Word | 1 | 11-13-2011 11:17 PM |