Sub Find() Dim Dim Dim Dim MyCount As Integer MyWord As String Total As Integer intI As Integer

'Prompt the user for the word to search for. MyWord = InputBox("What word are you looking for?:") 'Select the entire document Selection.WholeStory 'Count the total number of words in the document Total = Application.Selection.Range.Words.Count 'Enumerate through each word selected, removing leading ' and trailing spaces For intI = 1 To Total With Selection.Words(intI) If Trim(.Text) = MyWord Then MyCount = MyCount + 1 End If End With Next intI 'Display results MsgBox "Found " & MyCount & " occurrences of: " & MyWord & _ " out of a total of: " & Total & " words" End Sub