Copy link to clipboard
Copied
Hi Everyone,
After updating the content in my table the table content overflows and it need not fit with frame.
See the below code :
Try this code snippet:
for(var s = 0; s < app.activeDocument.stories.length; s++){
var tempStory = app.activeDocument.stories[s];
for(var t = 0; t < tempStory.tables.length; t++){
var tempTable = tempStory.tables[t];
var tempTableFrame = tempTable.cells[0].insertionPoints[0].parentTextFrames[0];
var cells = tempTable.cells;
for(var c=0; c < cells.length; c++){
if(cells[c].contents.match(/LINKED IMAGES:/)){
cells[c].contents = "L
...
Copy link to clipboard
Copied
Try this code snippet:
for(var s = 0; s < app.activeDocument.stories.length; s++){
var tempStory = app.activeDocument.stories[s];
for(var t = 0; t < tempStory.tables.length; t++){
var tempTable = tempStory.tables[t];
var tempTableFrame = tempTable.cells[0].insertionPoints[0].parentTextFrames[0];
var cells = tempTable.cells;
for(var c=0; c < cells.length; c++){
if(cells[c].contents.match(/LINKED IMAGES:/)){
cells[c].contents = "Link Names: \r" + Links;
}
tempTableFrame.fit(FitOptions.FRAME_TO_CONTENT);
}
}
}
Best
Sunil