I am using Visual Basic 2008 Express Edition and when I try the following code get the error message "Array is a type and cannot be used as an expression."
What am I doing wrong?
Public
Class Form1
Dim appRef As Illustrator.Application
Dim documentRef As Illustrator.Document
Dim sampleText As Illustrator.TextFrame
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
appRef = CreateObject(
"Illustrator.Application")
REM Create a new document and assign it to a variable
documentRef = appRef.Documents.Add
REM Create a new text frame item and assign it to a variable
sampleText = documentRef.TextFrames.Add
REM Set the contents and position of the TextFrame
sampleText.Position = Array(200, 200)
sampleText.Contents =
"Hello World!"
End Sub
End
Class
Comments
Val, you may want to post this on the Illustrator Forum under the Scripting section -- there's likley to be greater visibility there:
http://www.adobeforums.com/cgi-bin/webx?14@@.3bb50db0