Adobe 26001360 Scripting Guide - Page 442
Stories, A collection
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 442 highlights
442 Visual Basic Reference Dim docRef As Illustrator.Document Set docRef = appRef.Documents.Add() Dim storyRef1 As Illustrator.Story Dim storyRef2 As Illustrator.Story Dim textRef1 As Illustrator.TextFrame Dim textRef2 As Illustrator.TextFrame Dim itemRef1 As Illustrator.pathItem Dim itemRef2 As Illustrator.pathItem ' Create the first text frame Set itemRef1 = docRef.PathItems.Rectangle(600, 200, 50, 30) Set textRef1 = docRef.TextFrames.AreaText(itemRef1) textRef1.Selected = True ' create the 2nd text frame and ' link it to the first Set itemRef2 = docRef.PathItems.Rectangle(550, 300, 50, 200) Set textRef2 = docRef.TextFrames.AreaText(itemRef2, aiHorizontal, textRef1) textRef1.Contents = "This is two text frames linked together as one story" textRef2.Selected = True appRef.Redraw MsgBox "There is " & CStr(docRef.Stories.Count) & " story" ' Create a 3rd text frame and count the stories Dim textRef3 As Illustrator.TextFrame Set textRef3 = docRef.TextFrames.Add textRef3.Contents = "Each unlinked textFrame adds a story." textRef3.Top = 650 textRef3.Left = 200 appRef.Redraw MsgBox "Now there are " & CStr(docRef.Stories.Count) & " stories" Stories A collection of Stories. Table 5.143 Stories - Properties Property R/O Value type What it is Application Count Parent R/O Application object The Illustrator Application object Long The number of elements in the collection R/O Document object The object's container 12 Aug 03