11 Replies Latest reply on Nov 8, 2011 8:02 PM by Green4ever

    textFrames.add({strokeweight:0}) is not working properly in indesign CS5 Win Xp

    Green4ever Level 3

      Hi EveryOne,

       

      I am using the below line in my script,

       

      myFrame = myDoc.pages[1].textFrames.add({strokeWeight:"0pt"});
      

       

      It is creating a text frame, but with 1pt stroke weight. While i'm checking in the data browser it says "The property is not applicable in the current state".

       

      But when I alert the (myFrame.strokeWeight) it alerts with the correct value.

       

      My Work Around: (Still it is Bad)

      Then I changed the code

      myFrame = myDoc.pages[1].textFrames.add({strokeWeight:"0pt"});
      myFrame.strokeWeight = 0;
      

      Then it works for me. The problem is I have to give the stroke values in two places, If I remove any one of them, then my code is not working properly.

       

      Please help me to overcome this issue....

       

      ----

      Green4ever