Adobe 26001360 Scripting Guide - Page 302
Example 6.1, Table 5.13, CharacterStyles - Methods
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 302 highlights
302 Visual Basic Reference Table 5.13 CharacterStyles - Methods Method Returns What it does Add(Name As String) CharacterStyle Index(ItemPtr as CharacterStyle) Long Item(ItemKey) CharacterSytle RemoveAll() Nothing Create a named character style Returns the index position of the object within the collection Returns an object reference to the object identified by itemKey; by name or index Deletes all objects in this collection 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'." 12 Aug 03