3 Replies Latest reply on Jan 4, 2010 3:37 AM by Peter Kahrel

    Add cross reference in 4th level topic in Index


      Is there any problem in adding cross reference to the 4th level topic in Index creation in InDesign CS3 using JS. But it is added when doing manually.


             var m_Index = doc.indexes.add();
             var m_Topic1 = myIndex.topics.add(Ind1_Text);                           
             var m_Topic2 = myTopic1.topics.add(Ind2_Text);                           
             var m_Topic3 = myTopic2.topics.add(Ind3_Text);                                
             var m_Topic4 = myTopic3.topics.add(Ind4_Text);


             CRefTopic = "Fair educational practises act";

             sText = app.selection[0];


             var RefTopic = myTopic4.topics.add(CRefTopic); 


             The highlighted code shows the error: "Cannot create an additional item. Operation not permitted on this object."


             Can anyone help on this.