4 Replies Latest reply on Jun 2, 2009 4:02 PM by AdobeScripts

    How to change font size in a table?

    lyscrn

      How to change font size in a table without using the font style of another document?  Please show a sample script.  Thanks!

        • 1. Re: How to change font size in a table?
          Dave Saunders Level 4

          It might help us to help you if you started out by showing us the code you're using to do this that uses a font style of another document.

           

          Dave

          • 2. Re: How to change font size in a table?
            lyscrn Level 1

            Hi Dave,

             

            Thank you so much for the email.  I tried every object and method I can

            posibly think about such as

             

             

             

            myTable.Rows.Item(1).PointSize = 24

             

             

             

            myCell.Characters.Item(1).PointSize = 24

             

             

             

            I got error message all the time.  These objects don’t support PointSize.

             

            All I need is to change point size of the text in InDesign tables created

            using VBScript. Could you help me with this?  Thanks,

             

             

             

            Regards,

             

             

             

             

             

            Li

            • 3. Re: How to change font size in a table?
              Thomas B. Nielsen Level 3

              I dont know Vbscript, but in javscript, you do like this:

              myCell.characters.item(1).pointSize = 24;

              (Which would make the second character 24 units large)

               

              In short, dont use uppercase for the first char - in OMV select characters, then pointSize, then you can see how it should be written.

              (This could be different in Vbscript but dont think so.)

               

              A JS example:

              myDocument = app.activeDocument;
              myCell = myDocument.pages[0].textFrames[0].tables[0].cells[0];
              myCell.texts[0].pointSize = 24;

              • 4. Re: How to change font size in a table?
                AdobeScripts Level 3

                the Cell is container for text contents - you need to refer to this text to change it's formatting

                 

                myCell.Texts.Item(1).Characters.Item(1).PointSize = 24

                 

                or

                 

                myCell.Texts.Item(1).PointSize = 24

                 

                if you want to change PointSize for entire Cell's contents - even hidden text

                 

                robin

                 

                www.adobescripts.co.uk