5 Replies Latest reply on Aug 15, 2011 2:24 PM by RichardM0701

    Changing the Font style in a Paragraph Style

    RichardM0701 Level 1

       

      I have a code that changes the font of my paragraph style, but i also need it to change the font style. I have the following code and the applied font style line is throwing an error.

       

       

       

      myStyle = app.activeDocument.paragraphStyleGroups.item("Headings").paragraphStyles.item("Heading 1");
      myStyle.appliedFont = "Microsoft JhengHei";
      myStyle.appliedFontStyle = "Bold";
      

       

      The code works without the last line in it but when it is in I get this error:

      Window Capture.png

      I looked it up on the Jongware site under Font Style:

      http://jongware.mit.edu/idcsjs5.5/pc_ParagraphStyle.html