Article ID: 163692
Article Last Modified on 10/11/2006
Sub GetWords()
' Dimension the variables.
Dim oTextRange As TextRange
Dim i As Long
' Get reference to the selected text.
Set oTextRange = ActiveWindow.Selection.TextRange
' Loop through the words in the selection.
For i = 1 To oTextRange.Paragraphs.Words.count
' Output each word in a message box.
MsgBox oTextRange.Paragraphs.Words(i, 1)
Next i
End Sub
176476 OFF: Office Assistant Not Answering Visual Basic Questions
163435 VBA: Programming Resources for Visual Basic for Applications
Additional query words: 8.00 ppt8 vba vbe ppt8.0 macppt mac_ppt ppt98 powerpt
Keywords: kbcode kbdtacode kbhowto kbmacro kbprogramming KB163692