![]() |
#2
|
||||
|
||||
![]()
Does this work for you?
Code:
Sub HighlightTagger() Dim aRng As Range Set aRng = ActiveDocument.Range With aRng.Find .Text = "" .ClearFormatting .Replacement.ClearFormatting .MatchWildcards = False .Forward = True .Wrap = wdFindStop .Highlight = True Do While .Execute Select Case aRng.HighlightColorIndex Case wdYellow aRng.InsertBefore "[Color: Yellow]" Case wdBlue aRng.InsertBefore "[Color: Blue]" Case Else aRng.InsertBefore "[Color: Other]" End Select If aRng.Characters.Last = vbCr Then aRng.Characters.Last.InsertBefore "[/Color]" Else aRng.InsertAfter "[/Color]" End If aRng.Collapse Direction:=wdCollapseEnd Loop End With End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
Tags |
highlight, highlight color |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
jackcoletti | Word | 3 | 02-01-2017 08:10 AM |
![]() |
Jonfrank1@me.com | Project | 1 | 01-09-2017 06:04 PM |
![]() |
AustinBrister | Word VBA | 8 | 05-28-2015 02:42 PM |
![]() |
sential | Word | 6 | 01-10-2014 03:22 PM |
Macro for tagging and rearranging selected text for revision | caotico | Word VBA | 0 | 03-28-2012 06:35 PM |