0 Replies Latest reply on Mar 29, 2013 8:39 AM by shilpa25

    find text properties and change with created paragraph styles

    shilpa25

      Hi Forum!

       

      Im trying to do something new of myself!.

       

      First Step: I  store the text properties of the insertion point[0] in findTextPreferences.

      Second step:  I create the paragraphStyles with the properties of the findTextPreferences.properties.

       

      now the paragraphStyle is created with the properties of the insertion point[0].

       

      and then,  Im trying to apply the created paragraphStyle  to the cusor point (insertion point[0]). but i cannot.

       

      Can anyone help on this please. Here my code.

       

      app.changeTextPreferences = NothingEnum.NOTHING;

      app.findTextPreferences = NothingEnum.NOTHING

      mySelection=app.selection[0]

      app.findTextPreferences.properties =mySelection.insertionPoints[0].properties; [First Step:]

          app.activeDocument.paragraphStyles.add().properties=mySelection.insertionPoints[0].proper ties;

      [ Second Step:]

       

      app.changeTextPreferences.appliedParagraphStyle.name = ????????? (here I want to apply the created paragraphStyle);

      app.changeText();

      app.changeTextPreferences = NothingEnum.NOTHING;

      app.findTextPreferences = NothingEnum.NOTHING

       

      thanks

      Shil!...