Copy link to clipboard
Copied
Hi,
I want to add 3 linebreaks after every table in my document. Then i want to convert the tables to text (sorry, but it makes sense for some export reasons ;-)).
Step 2 i got with: "app.activeDocument.stories.everyItem().tables.everyItem().convertToText("\t", "\r");"
But i can't find out how i place a text-insert with '\r\r\r' after every table (before step 2).
many thanks for your help
Hi,
An approach is to loop through insertion points using the storyOffset property of the tables:
// Get the array of tables' insertionPoints
// ---
var ips = app.activeDocument.stories.everyItem().tables.everyItem().storyOffset,
i = ips.length;
while( i-- )
with( ips.insertionPoints.nextItem(ips) )
isValid && contents = '\r\r\r';
@+
Marc
Copy link to clipboard
Copied
Hi,
An approach is to loop through insertion points using the storyOffset property of the tables:
// Get the array of tables' insertionPoints
// ---
var ips = app.activeDocument.stories.everyItem().tables.everyItem().storyOffset,
i = ips.length;
while( i-- )
with( ips.insertionPoints.nextItem(ips) )
isValid && contents = '\r\r\r';
@+
Marc
Copy link to clipboard
Copied
Thank you Marc!
this works perfectly!
Copy link to clipboard
Copied
M. Marc,
Could you please help me to use this secript? (Mac, ID 2021)
Thanks.
as the result is Error 21/undefined is not an object:
with( ips.insertionPoints.nextItem(ips) )
Your script: