Adobe 26001360 - Illustrator CS - PC Manual page 302

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

Advertisement

302
Table 5.13 CharacterStyles — Methods
Method
Add(Name As String)
Index(ItemPtr as CharacterStyle) Long
Item(ItemKey)
RemoveAll()
Example 6.1
' Character Styles
'
' Open a document, and add 3 simple text frames
'
' Create a new character style and apply it to
' each of the text frames
'
Dim appRef As New Illustrator.Application
Dim docRef As Illustrator.Document
Dim textRef1 As Illustrator.TextFrame
Dim textRef2 As Illustrator.TextFrame
Dim textRef3 As Illustrator.TextFrame
' Create a new document add a 3 simple text items
Set docRef = appRef.Documents.Add()
Set textRef1 = docRef.TextFrames.Add()
textRef1.Contents = "Scripting is fun!"
textRef1.Top = 700
textRef1.Left = 50
Set textRef2 = docRef.TextFrames.Add()
textRef2.Contents = "Scripting is easy!"
textRef2.Top = 625
textRef2.Left = 100
Set textRef3 = docRef.TextFrames.Add()
textRef3.Contents = "Everyone should script!"
textRef3.Top = 550
textRef3.Left = 150
appRef.Redraw
' Create a new character style
MsgBox "Create and apply a character style 'BigRed'."
Returns
What it does
Create a named character style
CharacterStyle
Returns the index position of the object
within the collection
Returns an object reference to the object
CharacterSytle
identified by itemKey; by name or
index
Nothing
Deletes all objects in this collection
12 Aug 03
Visual Basic Reference

Advertisement

Table of Contents
loading

This manual is also suitable for:

Illustrator cs

Table of Contents