MacOS – Mac Automator/Word 2016 macro: Trying to make workflow/macro that removes highlights from bullet points in Word 2016 for Mac

automationautomatormacosms office

THE PROBLEM
I am working in Microsoft Word 2016 for Mac on a very large bullet-point outline in which I frequently need to highlight text. If I highlight all the text on a bullet point, word automatically highlights the bullet point as well. This is because Word by default makes its bullet points take on the styles of their associated text, including highlights. This default behavior has always somewhat irked me because I find the resulting highlighting of bullet points distracting and sloppy.

PREVIOUS MANUAL FIXES
Previously, I have manually fixed the issue. For example, I sometimes would highlight only part of the associated text, then highlighting the rest of text (partially fixing the issue ex ante–but not allowing me to highlight all the text I wanted to at once). Other times, I would fix the issue ex post: I would highlight all the associated text, resulting in the bullet point becoming highlighted, but would then delete the bullet point, bring my text into line with the previous unhighlighted bullet point, and then click "enter" to create a new unhighlighted bullet point (this worked because the text associated with the previous bullet point was not completely highlighted).

THE NEED FOR AUTOMATION
Now, however, I am dealing with a very long document and repetitively manually fixing the issue would be far too inefficient. Thus, I am now looking for a solution that fixes/prevents the bullet point highlighting without me having to make arduous individual changes each time I highlight all the text associated with a bullet point.

My hope is that I could create either an Automator workflow or Microsoft Word 2016 (for Mac) macro that, upon activation, would either: (i) highlight only the associated text of a bullet point–leaving the bullet point unhighlighted–or (ii) automatically remove the highlighting of a highlighted bullet point while leaving the associated text highlighted. With regard to option (ii), I would be happy with a workflow/macro that either (a) removed highlighting from an individual bullet point or (b) removed highlighting from all bullet points in a given document–though the latter is probably preferable. Does anyone have any ideas as to whether any of these options are feasible, and, if so, which would be easiest to implement?

Best Answer

I figured out how to do it with a Word macro (VBA). The below will highlight only the text (and not the bullet point) of the paragraph/associated text where the cursor is. You can keybind the macro to make this pretty fast. However, this is not the fastest fix because it doesn't allow you to highlight en masse, but it certainly is way faster than doing it manually.

Hope this can help someone who runs into the same problem that I had!

Sub Highlighter_Macro()
'
' Highlighter_Macro Macro
'
'
    Selection.EndKey Unit:=wdLine
    Selection.MoveUp Unit:=wdParagraph, Count:=1
    Selection.MoveDown Unit:=wdParagraph, Count:=1, Extend:=wdExtend
    Selection.MoveLeft Unit:=wdCharacter, Count:=3, Extend:=wdExtend
    Options.DefaultHighlightColorIndex = wdTurquoise
    Selection.Range.HighlightColorIndex = wdTurquoise
    Selection.EndKey Unit:=wdLine
    Selection.MoveLeft Unit:=wdCharacter, Count:=3, Extend:=wdExtend
    Options.DefaultHighlightColorIndex = wdTurquoise
    Selection.Range.HighlightColorIndex = wdTurquoise
    Selection.EndKey Unit:=wdLine
End Sub