Skip to main content
Known Participant
December 1, 2015
Question

VBScript CreateObject to target specific Illustrator version

  • December 1, 2015
  • 1 reply
  • 866 views

Since I didn't see this when I searched the forum, I'm posting so others can find it. In the current Illustrator CC 2015 Scripting Guide PDF (link in this forum on the right menu), there is a possible error on Section 3: Scripting Illustrator, Launching and activating Illustrator, VBScript (pages 22-23).

  • When using Set appRef = CreateObject("Illustrator.Application") the guide says that to specifically target the version Illustrator CC 2015, use "Illustrator.Application.CC2015"
  • So I used: Set appRef = CreateObject("Illustrator.Application.CC2015")
  • I got the following error: "ActiveX component can't create object: 'Illustrator.Application.CC2015'"
  • Turns out, there must be a period between "CC" and "2015"
  • The correct text is: Set appRef = CreateObject("Illustrator.Application.CC.2015")
  • The VBScript ran correctly after this change was made

I don't know if there's something specific to my setup causing this, but if anyone else is searching who is having a similar issue, I wanted them to be able to find this. I wish I had, would have saved me a lot time troubleshooting!

This topic has been closed for replies.

1 reply

CarlosCanto
Community Expert
Community Expert
December 2, 2015

Thanks for sharing Nlwest