Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mikethebook

macrumors regular
Original poster
May 30, 2010
179
21
I want to set up some already written macros in Word 2016 for Mac. I've followed the instructions given at https://support.office.com/en-us/ar...D-124D-4CC7-BAE0-111C9C26E234#ID0EAABAAA=2016 but whatever is created doesn't do anything with the documents I've tried. And there are no error messages.

The instructions say, "Word records your clicks and keystrokes, but it does not record text that you select with the mouse. To select text while recording a macro, use the keyboard." I've done that, copying and pasting with the keyboard. Do the macros only work with certain formats e.g. docx?

Or is the problem in the macros themselves for a Mac version of Word? Here's an example I've tried below. Can anyone help?
Mike

Sub TellingWords()
' Highlights telling words
'
'
' Written by Roger Mortis, revised by Subcortical, adapted by Jami Gold and tweaked by C.K. MacLeod; word list by Valerie Comer and Janice Hardy
'
Dim range As range
Dim i As Long
Dim TargetList
TargetList = Array("was", "were", "when", "as", "the sound of", "could see", "saw", "notice", "noticed", "noticing", "consider", "considered", "considering", "smell", "smelled", "heard", "felt", "tasted", "knew", "realize", "realized", "realizing", "think", "thought", "thinking", "believe", "believed", "believing", "wonder", "wondered", "wondering", "recognize", "recognized", "recognizing", "hope", "hoped", "hoping", "supposed", "pray", "prayed", "praying", "angrily")
For i = 0 To UBound(TargetList)
Set range = ActiveDocument.range
With range.Find
.Text = TargetList(i)
.Format = True
.MatchCase = False
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
Do While .Execute(Forward:=True) = True
range.HighlightColorIndex = wdPink
Loop
End With
Next
End Sub
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.