Skip to main content
Participant
July 5, 2013
Answered

How do I add the Adobe Illustrator CS6 Type Library?

  • July 5, 2013
  • 3 replies
  • 3325 views

Hi everyone

I am trying to write a script for Adobe Illustrator using VBA in Excel.  To do this I am following the Adobe Illustrator Scripting Guide which can be found at the link below.

http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/pdf/illustrator/scripting/cs6/Illustrator-Scripting-Guide.pdf

The problem is that I am not able to follow one of the first steps in the process.  Specifically I cannot complete step 3:

1.     In any Microsoft Office application, choose Tools > Macro > Visual Basic Editor.

2.     In the Visual Basic Editor, choose Tools > References.

3.     In the dialog that appears, select the check box for Adobe Illustrator CS6 Type Library, and click OK.

The reason I cannot complete this step is because Adobe Illusterator CS6 Type Library does not appear in the list of available type libraries.

If you know how to get the type library into this list please would you explain how to me?

I appreciate everyone's time and thank you in advance! 

PS.   In case it is relevant my detalis are as follows:

Computer:  Macbook Pro

Adobe Illustrator Version:  CS6

Excel Version: 2011

This topic has been closed for replies.
Correct answer CarlosCanto

no, it is not documented, the docs focus on vbs only. I have tried myself, at first I thought vba did not work on mac, but it does, I think the purpose is to drive Office Programs only or among each other, but not other non-Office software...at least that's what I think, I don't own a mac.

Edit:

by the way, what other software do you get in the list of available References on a mac?


well, the scripting guide does mention vba...

If you work in Mac OS®, your choices are:

   AppleScript

   JavaScript

If you work in Windows®, your choices are:

   VBScript (Visual Basic and VBA will also work)

   JavaScript

3 replies

September 11, 2015

I know this is an old post, but the first that google brought up. I was looking to update my Adobe Illustrator CS5 Type Library to CS6, as we haven't moved onto CC.

I'm surprised no one even attempted to show the versatility in using other programming languages to be more efficient. All offices, factories and sales use Excel to track product lists, and using VBA has saved me a ton of time. So, just a primer for those looking for info...

You can read and write to open Illustrator files using VBA macros within Excel. This allows you to quickly mass-edit from Excel. — Think: 3000+ packaging artwork that require copy edited, or artwork repositioned, or colors shifted. Everything is already in Excel, why not use it. Maybe 4 clicks instead of 4 minutes.

Anyway, still looking for CS6 Library.

VBA Example using CS5.0 Library:

Sub ReadIllustratorTextFrames()
    Dim iapp As New Illustrator.Application
    Dim idoc As Illustrator.Document
    Dim tFrame As Illustrator.TextFrame
    rou = 1
    colum = 3 'read
    'colum = 4 'write
    Set idoc = iapp.ActiveDocument
    For Each tFrame In idoc.TextFrames
        Cells(rou, colum) = tFrame.Contents 'read
        Cells(rou, colum + 1) = tFrame.Contents 'text to editted
        'tFrame.Contents = Cells(rou, colum) 'write
        rou = rou + 1
    Next
    Set fFrame = Nothing
    Set idoc = Nothing
    Set iapp = Nothing
    MsgBox ("Text from Illustrator file is in Column C." & vbNewLine & "Text to be editted and written back" & vbNewLine & " to open Illustrator file is in Column D.")
End Sub

Sub WriteIllustratorTextFrames()
    Dim iapp As New Illustrator.Application
    Dim idoc As Illustrator.Document
    Dim tFrame As Illustrator.TextFrame
    rou = 1
    'colum = 3 'read
    colum = 4 'write
    Set idoc = iapp.ActiveDocument
    For Each tFrame In idoc.TextFrames
        'Cells(rou, colum) = tFrame.Contents 'read
        tFrame.Contents = Cells(rou, colum) 'write
        rou = rou + 1
    Next
    Set fFrame = Nothing
    Set idoc = Nothing
    Set iapp = Nothing
End Sub

Participant
July 11, 2013

Thank you for your help Carlos!  It definitely saved me some time.

And for anyone else out there worried about learning Java from VBA, don't be!  It is quite similar.

Thanks again!

JETalmage
Inspiring
July 16, 2013

It's not Java. It's Javascript. Two entirely different things.

JET

CarlosCanto
Community Expert
Community Expert
July 5, 2013

vba is available for the Windows platform, for Mac use AppleScript or better yet, Javascript.

Participant
July 5, 2013

Hi Carlos

Thank you for your help.  That's a pity because I am familiar with VBA but I have not tried Java or AppleScript before, I will need to look into them.

Also, how did you discover that this is the case?  Is the availability of vba for Mac mentioned anywhere in Adobe's documentation?

CarlosCanto
Community Expert
Community Expert
July 5, 2013

no, it is not documented, the docs focus on vbs only. I have tried myself, at first I thought vba did not work on mac, but it does, I think the purpose is to drive Office Programs only or among each other, but not other non-Office software...at least that's what I think, I don't own a mac.

Edit:

by the way, what other software do you get in the list of available References on a mac?