Skip to main content
June 25, 2009
Question

[JS CS3 and CS4] Place snippet at insertionPoint fails in CS3 but works in CS4

  • June 25, 2009
  • 2 replies
  • 628 views

The following code will place a snippet at an insertion point to create an anchored object in CS4 but in CS3 it causes a crash.

var myImage = app.documents[0].pageItems.item("photo1");

var mySnippet1 = "temp1.inds"

myImage.exportFile(ExportFormat.indesignSnippet, File(mySnippet1));

AllParagraphs = app.documents[0].stories[0].paragraphs;    

AllParagraphs.item(i).insertionPoints[0].place(mySnippet1);

Can anyone explain why and is there an alternative method to avoid this crash?.

Thanks

Skemp.

This topic has been closed for replies.

2 replies

Inspiring
July 1, 2009

In CS3, you have to select the insertion point and then place to achieve this. CS4 is a big step forward in this regard.

Dave

Known Participant
July 1, 2009

Hi Skemp,

From CS3 to CS4 they change some properties of object, you can debug your code in CS3 and find out what is the reason of your code, then search them at CS4 Object Model Viewer you will find the reason why you can not run your code under CS3.

Regards,

Robin