Rem Given an instance of InDesign "myInDesign"...
myInDesign.WordRTFImportPreferences.PreserveGraphics = True
myInDesign.WordRTFImportPreferences.ConvertTablesTo = idUnformattedTable
Rem ...set other import preferences...
Rem Now do your place operation
This script produces different results in CS3 and CS4:
var myDoc = app.documents.add();
var myTF = myDoc.pages[0].textFrames.add({geometricBounds:myDoc.pages[0].bounds} );
var myTable = myTF.parentStory.tables.add(LocationOptions.atEnd);
myTable.bodyRowCount = 7;
for (var j = myTable.bodyRowCount - 1; j >= 0; j--) {
myTable.cells.item("0:" + j).contents = String(j);
}
var myArray = myTable.columns[0].cells.itemByRange(1, myTable.bodyRowCount -1).texts[0].contents;
alert(myArray)
In CS3, you get an alert that reads:
1,2,3,4,5,6
In CS4, you get just:
1
To get the same alert in CS4 you need to use this to construct myArray:
var myArray = myTable.columns[0].cells.itemByRange(1, myTable.bodyRowCount-1).cells.everyItem().contents;
Dave
Hi,
there is a difference between CS3 and CS4 if you want to get the contents of the line of an XmlElement:
If you have myXmlElement in a line and you try to get the contents with
myXmlElement.lines[0].contents;
With CS3 you get the content of the whole line whereas with CS4 you get only the contents up to the XmlElement.
Can anyone confirm this ?
Thanks Stefan
North America
Europe, Middle East and Africa
Asia Pacific