1 Reply Latest reply on Oct 9, 2008 6:38 PM by (Dave_Saunders)

    How to set the vertical space between two textFrames in a table cell

      Hi:
      I add two textFrames in a table cell, and I want to set the vertical space to 8 between two textFrames, any help?

      var myDocument = app.open("c:/test.indd")
      var page1 = myDocument.pages.item(0)
      var textFrame1 = page1.textFrames.item(0)
      var oTmpTable = textFrame1.tables.add()
      oTmpTable.headerRowCount = 1
      oTmpTable.bodyRowCount = 1
      oTmpTable.columnCount = 5
      var oTmpCell = oTmpTable.cells.item("0:1")
      oInsertionPoints = oTmpCell.insertionPoints
      var oTF = oInsertionPoints.item(-1).textFrames.add()
      oTF.geometricBounds = [0,10,50,120] // but this takes no effect
      oInsertionPoints = oTmpCell.insertionPoints
      oInsertionPoints.item(-1).contents = ""
      oTF = oInsertionPoints.item(-1).textFrames.add()
      oTF.geometricBounds = [58,10,110,120] // this takes no effect
      myDocument.save();
      app.documents.item(0).close();
      app.quit()

      Thanks