Adobe 26001360 - Illustrator CS - PC Manual page 465

Scripting guide
Hide thumbs Also See for 26001360 - Illustrator CS - PC:
Table of Contents

Advertisement

Adobe Illustrator CS Scripting Guide
Table 5.170 TextRange — Methods (Continued)
Method
DeSelect()
Duplicate(
[relativeObject As
Object],
[insertionLocation
As ElementPlacement]
)
Move(
relativeObject as
Object,
insertionLocation as
ElementPlacement)
Select(AddToDocument)
Example 89.1
Dim appRef As New Illustrator.Application
Dim textArt As Illustrator.TextFrame
Dim textArtRange As Illustrator.TextRange
Dim textWord As Illustrator.Word
Dim wordLen As Integer
Dim charsToChange As Integer
Dim firstChars As Illustrator.TextRange
For Each textArt In appRef.ActiveDocument.TextFrames
Set textArtRange = textArt.TextRange
For Each textWord In textArtRange.Words
'For each word we check to see if it is longer than 2 characters
'if it is we'll resize the first 2 characters
'if it is no we'll resize the whole word
wordLen = Len(textWord.Contents)
If (wordLen < 2) Then
charsToChange = wordLen
Else
charsToChange = 2
End If
If (charsToChange > 0) Then
'Here we are obtaining a sub range. By leaving the
'first argument out, we say: From the beginning to
Returns
TextRange
Nothing
12 Aug 03
What it does
Deselect the text range
Duplicate an art item, optionally
specifying the location and position for
the copy
Move an art item, specifying the new
location and position.
Selects the text range
465

Advertisement

Table of Contents
loading

This manual is also suitable for:

Illustrator cs

Table of Contents