![]() |
#1
|
|||
|
|||
![]()
I have a unique case where I want to move the selection forward in a document to the first of either the next highlighted word or the next word with turquoise font color. I know both actions are individually possible with:
Code:
Selection.Find.ClearFormatting Selection.Find.Highlight = True Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "" .Replacement.Text = "" .Forward = True .Wrap = wdFindAsk .Format = True .MatchCase = False End With Selection.Find.Execute Code:
Selection.Find.ClearFormatting Selection.Find.Font.ColorIndex = wdTurquoise Selection.Find.Replacement.ClearFormatting 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.Find.Execute Thank you!! |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dragging a selection to copy it, not to move it | wardw | Word VBA | 2 | 11-28-2019 11:09 AM |
![]() |
Bumba | Excel Programming | 6 | 11-19-2019 08:50 AM |
![]() |
GuitarForLife | Word VBA | 7 | 02-09-2018 01:59 PM |
Search a folder to move an email to | koolman31 | Outlook | 0 | 02-11-2016 10:29 AM |
![]() |
paik1002 | Word VBA | 1 | 12-17-2015 04:51 AM |