9 Replies Latest reply on Aug 26, 2013 1:15 AM by RBastier

    app.changeGrepPreferences.appliedParagraphStyle

    RBastier

      Why does this work:

       

      function changeBoldToCharacterStyleBold(){

          app.findGrepPreferences = NothingEnum.nothing;

          app.changeGrepPreferences = NothingEnum.nothing;

         

          app.findGrepPreferences.fontStyle = 'Bold';

          app.changeGrepPreferences.appliedCharacterStyle = 'bold';

         

          var result = app.changeGrep();

         

      }

       

      but this doesn't:

       

      function putStarsInSummaryInSuParaStars(){

        

          app.findGrepPreferences = NothingEnum.nothing;

          app.changeGrepPreferences = NothingEnum.nothing;

         

          app.findGrepPreferences.findWhat = '^\\*';

          app.changeGrepPreferences.appliedParagraphStyle = 'Su_Para_*';

         

          var result = app.changeGrep();

         

      }

       

      The ParagraphStyle, like the CharacterStyle that I apply in the other example that works, exists. I get error message 30477 Invalid value for set property 'appliedParagraphStyle'. Expected String, ParagraphStyle or NothingEnum enumerator, but received "Su_Para_*".

       

      Please help, thanks!