How to adjust a table imported from Word to InDesign
Hi all,
I am new to InDesign scripting. The problem I have is that I have hundreds of Word 2003 files which I need to import into InDesign CS5. The basics are under control excepting the tables. They import OK but then I need to change the cell padding, the style and the alignment of each table. There are lots per file.
I found a script "TableStyle.js" which adjusts the cell padding for all tables in an InDesign file (extract from the file below). What I don't know is how to change the entire table (or perhaps it is the enclosing paragraph) to Normal style and centred alignment.
Can anybody help
// Processing of tables
function myTableMaker() {
try{var myTablesCount = mySelect.tables.length;}
catch(err){var myTablesCount = 1;}
for (myCounter = 0; myCounter < myTablesCount; myCounter++) {
try{
var myTable = mySelect.tables.item(myCounter);
}
catch(err){
var myTable = mySelect;
}
// Setting spaces above and below
myTable.spaceBefore = mySpaceBeforeSave + myUnits;
myTable.spaceAfter = mySpaceAfterSave + myUnits;
// Change table justification to Centre Justified
// Change table style to Normal