2 Replies Latest reply on Sep 23, 2010 11:45 PM by Animosus

    Resize table width to column width [JS][CS4]

    Animosus

      Hi all,

      I'm working on a training manual at the moment which has a lot of tables set amongst the text which are running over two columns which I've set up on each page. I'm hoping a script will help me resize all the tables to fit within one column so I can actually see and format all my text as I go through the manual. I know I'll have to manually resize some of the tables later, but the majority will fit within one column. I have been tinkering with a javascript, however I'm very much a beginner when it comes to scripting. Here's what I have at the moment (cobbled together from another post on these forums and the object model viewer):

       

      app.activeDocument.stories.everyItem().tables.everyItem().Table.width = "75mm";

       

      This doesn't work for resizing the table, although with a few changes that line will clear table overrides for me.

       

      I'd like to get this working so that all the tables in my document have their widths resized to the column width (75mm). Any ideas? Am I on the right track?