1 Reply Latest reply on Dec 16, 2011 9:06 AM by [Jongware]

    Font range

    johnBking78 Level 1

      I use this script below:


      try {
           app.findTextPreferences.appliedParagraphStyle = "Number 8";
           app.changeTextPreferences.appliedParagraphStyle = "paraNumbered8";
           /*Clear the find/change preferences after the search.*/
           app.findTextPreferences = NothingEnum.nothing;
           app.changeTextPreferences = NothingEnum.nothing
      } catch(err){}



      This helps me change word styles to indesign ones quickly, but would like some help converting a font range, i.e "Font Times" inbetween 22 & 28 point = B Header.


      Can anyone help me?



      Many thanks!!

        • 1. Re: Font range
          [Jongware] Most Valuable Participant

          The only way I can think of is using TextStyleRanges. Loop over them, check if the font is "Font Times" (?) and if so, check if the size is within your range.


          Warning: if you attempt to change the paragraph style of a single word (or space!), the entire paragraph changes.