2 Replies Latest reply on Sep 2, 2010 4:43 AM by mannyk1234

    Make words in text bold

    mannyk1234 Level 1

      Hello,

       

      I have a textframe which gets filled with text. Now, I would like to make some specific words bold. This is my code:

      The problem is, that the whole paragraph is made bold and not only the title. How can I set bold only the title?

       

      var textframe = page.textFrames.add();
      textframe.geometricBounds = [0, 105, 50, 135];if (title.length > 0) {
          textframe.contents += title + ": ";
          // make title bold
          textframe.paragraphs.item(0).fontStyle = "Bold";
      }
      if (linebreak == "true") {
          textframe.contents += "\r";
      }
      if (value.length > 0) {
          textframe.contents += value + "\r";
      }
      
      

       

      Thanks and kind regards,

      mannyk