Option Explicit Rem This example counts the total words in any/all text art items in the Rem active document. This requires obtaining a TextRange reference for each Rem item to access its Words collection Private Sub Command1_Click() Dim appRef As New Illustrator.Application Dim docRef As Illustrator.Document Dim textArt As Illustrator.TextArtItem Dim textArtRange As Illustrator.TextRange Dim numberOfWords As Integer If (appRef.Documents.Count = 0) Then Set docRef = appRef.Documents.Add() Else Set docRef = appRef.ActiveDocument End If If (docRef.TextArtItems.Count = 0) Then Set textArt = docRef.TextArtItems.Add() textArt.Position = Array(100, 425) textArt.Contents = "Illustrator Scripting" textArt.TextRange().Size = 48 End If numberOfWords = 0 For Each textArt In docRef.TextArtItems Set textArtRange = textArt.TextRange numberOfWords = numberOfWords + textArtRange.Words.Count Next MsgBox "There are " & numberOfWords & " words in the active document" End Sub