Skip to main content
Participating Frequently
December 19, 2013
Answered

Why doesn't the #target directive work in InDesign CC scripting?

  • December 19, 2013
  • 2 replies
  • 3944 views

I have a script which works fine when run from ExtendScript Toolkit on both InDesign CS4 and InDesign CC -- but I am unable to specifically target CC using the #target directive.

At the top of my .jsx file, if I put:

#target "InDesign-6.0"

Then the script will open InDesign CS4 and run the script. However, if I put:

#target "InDesign-9.0"

It throws a dialog error "InDesign-9.0" is undefined! I've tried 8.0 and 9.1 just in case I had the version number wrong; nothing works.

Now, it is true that I can get it to work by simply adding:

#target "InDesign"

which targets the latest installed version, CC. BUT this is not a solution, just a workaround! I want to be absolutely sure I am targeting the specific version specified. Someday I may install a newer version alongside it, and then all of a sudden it will "jump" to that version when the script runs, and that's not what I want.

Any suggestions?

This topic has been closed for replies.
Correct answer Sumit_Garg

After CS6 InDesign was completely converted to 64-bit application.However for windows platform 32-bit version was still supported. Hence for Windows 32-bit and 64-bit both type of versions were part of installation.

To distinguish between 32-bit and 64-bit version of InDesign, following targets are used.

For Windows Use:

#target "indesign-9.032"      //If want use 32-bit version indesign

#target "indesign-9.064"      //If want use 64-bit version indesign

For Mac Use:

#target "indesign-9.064"      //As Most of the MAC machine are already 64-bit , Only 64-bit InDesign is provided for Mac.

2 replies

Sumit_Garg
Adobe Employee
Sumit_GargCorrect answer
Adobe Employee
December 20, 2013

After CS6 InDesign was completely converted to 64-bit application.However for windows platform 32-bit version was still supported. Hence for Windows 32-bit and 64-bit both type of versions were part of installation.

To distinguish between 32-bit and 64-bit version of InDesign, following targets are used.

For Windows Use:

#target "indesign-9.032"      //If want use 32-bit version indesign

#target "indesign-9.064"      //If want use 64-bit version indesign

For Mac Use:

#target "indesign-9.064"      //As Most of the MAC machine are already 64-bit , Only 64-bit InDesign is provided for Mac.

Trevor:
Legend
March 10, 2014

Hi Sumit

From outside indesign how does one reference indesign CC in VB

Both CreateObject(InDesign.Application) and CreateObject(InDesign.Application.CC) throw an error

Thanks

Trevor

Participant
April 15, 2014

Is it possible? I get Errors when Im trying to run my VB6 Code. With CS5 and CS6 it worked. Can you explain what happenden between CS6 and CC?

Participating Frequently
December 19, 2013

Actually, it appears now that using this directive works:

#target "InDesign-9"

Note the lack of a point version. (Have I missed anything?)