Concordance, Macro for

E

e125

I am making a series of concordances for articles I am translating from
Italian. I have a concordance with hundreds of words, some with multiple
occurrences others with only one.

Can someone write a macro that would allow me to highlight all entries in my
concordance that contain 3 or more occurrences in the document?

Any assistance would be much appreciated.
 
H

Helmut Weber

Hi,

depends on your concordance file.

Sub Test444()
help "aa"
End Sub

Sub help(s As String)
Dim rDcm As Range
Dim i As Long
Set rDcm = ActiveDocument.Range
With rDcm.Find
.Text = s
.MatchWholeWord = True
While .Execute
i = i + 1
Wend
End With
If i > 2 Then
' highlight terms in concordance
' what is it? an excel sheet?
' a text file?
' a Word file?
End If
End Sub

--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top