Adobe 26001360 Scripting Guide - Page 300
Characters, Example 5.1
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 300 highlights
300 Visual Basic Reference Characters Characters is a collection of TextRange objects with each TextRange representing a single character. Table 5.8 Characters - Properties Property R/O Value type Application Count Parent R/O Application R/O Long R/O Object What it is Application that the collection belongs to Number of elements in the collection The object's container Table 5.9 Characters - Methods Method Add(Contents As String [, RelativeObject] [, InsertionLocation]) AddBefore(Contents As String) Index(ItemPtr As TextRange) Returns TextRange TextRange Long RemoveAll() Nothing What it does Create a character Insert text at the beginning of the range. Returns an object reference to the object identified by itemKey; by name or index Delete every element in the collection Example 5.1 Dim appRef As New Illustrator.Application Dim numChars As Integer Dim textArt As Illustrator.TextFrame Dim textArtRange As Illustrator.TextRange If appRef.Documents.Count > 0 Then numChars = 0 For Each textArt In appRef.ActiveDocument.TextFrames Set textArtRange = textArt.TextRange numChars = numChars + textArtRange.length Next MsgBox ("There are " & numChars & " characters in the document.") End If 12 Aug 03