2 Replies Latest reply on Jun 11, 2009 11:34 PM by Kasyan Servetsky

    Text Style


      hi all


      i am new to indesign scripting,


      may i know that how can i set the text style for my text using script,


      right now i able to create multiple text frames in my document using script, but right now i wanna apply font style to it, and also change it color.


      can someone show me how to do it or provide me some examples.



        • 1. Re: Text Style
          goh6613 Level 1



          right now i want to know how to add in font family, font color, underline , italic and bold by using script....


          may i know how can i do this ?



          • 2. Re: Text Style
            Kasyan Servetsky Level 5

            // applies formatting to selected text

            var myDoc = app.activeDocument;
            var myText = app.selection[0];
            with (myText) {
                appliedFont = app.fonts.item("Myriad Pro\tBold Italic");
                fillColor = myDoc.swatches.item("C=15 M=100 Y=100 K=0");
                underline = true;