0 Replies Latest reply on Aug 14, 2010 12:32 PM by Green4ever

    Placing as an inline object...

    Green4ever Level 3




      I need to place an inline element, But it is repeating two times. I can't find why? can any one give suggestion on this...?


      Note: The highlighted one is having problem.

      "H1box" is groupped library element.

      "Rule" is single element, this element is repeating two times.



      function placeAnchor(style, objName, objStyle){
          var myDoc = app.documents[0];
          var myLib = app.libraries[0];
          app.findTextPreferences = NothingEnum.nothing;
          app.changeTextPreferences = NothingEnum.nothing;
          app.findTextPreferences = null;
          app.findTextPreferences.appliedParagraphStyle = style;


          myFind = myDoc.findText(true);
          var myCount=0;
          for (i=0; i<myFind.length; i++)
                  myText = myLib.assets.item (objName).placeAsset (myFind[i].insertionPoints[0])[0];
                  myText.appliedObjectStyle = objStyle;


      placeAnchor ("bch_ha", "H1box", "H1");
      placeAnchor ("bchfa_tt", "BYGrule", "Rule");



      Thanks in Advance....