This method works like the CountWords method and additionally writes the counted words in an array.

Syntax:

GetWords( Text As String, TextArray As Variant ) As Long
Return: Long
Parameters: Text Text to be analyzed.
TextArray Empty array of strings. The counted words will be saved in this array.

Example:
Dim Tool As WordsAnalysis
Dim NumberOfWords As Long
Dim StringAry() As Variant
Dim i As Integer

Set Tool = Application.Tools.WordsAnalysis

NumberOfWords = Tool.GetWords(Application.ActiveTransUnit.Source, StringAry)

For i = 1 To NumberOfWords
	MsgBox StringAry(i-1)
Next i

See also:

Class WordsAnalysis | WordsAnalysis.CountWords


Last Updated: 04/27/05