7 Replies Latest reply on Sep 11, 2015 12:22 PM by Aegemeni

    How do I add the Adobe Illustrator CS6 Type Library?

    SingingDude

      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/scrip ting/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

        • 1. Re: How do I add the Adobe Illustrator CS6 Type Library?
          CarlosCanto Adobe Community Professional & MVP

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

          • 2. Re: How do I add the Adobe Illustrator CS6 Type Library?
            SingingDude Level 1

            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?

            • 3. Re: How do I add the Adobe Illustrator CS6 Type Library?
              CarlosCanto Adobe Community Professional & MVP

              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?

              1 person found this helpful
              • 4. Re: How do I add the Adobe Illustrator CS6 Type Library?
                CarlosCanto Adobe Community Professional & MVP

                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

                • 5. Re: How do I add the Adobe Illustrator CS6 Type Library?
                  SingingDude Level 1

                  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!

                  • 6. Re: How do I add the Adobe Illustrator CS6 Type Library?
                    JETalmage Level 6

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

                     

                    JET

                    • 7. Re: How do I add the Adobe Illustrator CS6 Type Library?
                      Aegemeni

                      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