4 Replies Latest reply on Aug 11, 2016 6:25 AM by Trevorׅ

    creating a table in indesign using javascript

    leenh61786917

      Hi all,

       

      One of the first days I am using javascript and indesign together. I retrieved information from an xml file, am able to make a textframe and fill it with text with the following code:

       

      var myDocument = app.documents.add();

      var myTextFrame = myDocument.pages.item(0).textFrames.add();

      myTextFrame.geometricBounds = ["6p", "6p", "10p", "10p"];

      myTextFrame.contents = "Test message";

       

      But I can't seem to figure out how to create a table..

       

      Can someone help me please? I just need a table with like 3 rows and 3 columns. I guess it should be very simple and much like adding the textframe but I just can't figure it out..

       

      Thanks in advance