Skip to main content
Participant
February 17, 2010
Question

Convert Table to Text Script

  • February 17, 2010
  • 1 reply
  • 12780 views

Does anyone know if there is an Indesign script that will convert all tables in a document to text? I need a fast way to get rid of all tables in a long document before exporting for Digital Editions.

1 reply

Inspiring
February 17, 2010

Check this one:

http://forums.adobe.com/message/1951975#1951975

Shonky

Jongware
Community Expert
Community Expert
February 17, 2010

The script mentioned in there is not complete -- it works, but on the first table only. This one works, to my own surprise:

var myDoc=app.activeDocument; 
tableList = myDoc.textFrames.everyItem().tables.everyItem();
tableList.convertToText("\t","\r");

-- it's not really much longer than the original, appears to work almost instantly on all tables in the entire document, and it's a single Undo/Redo.

Goes to show I've still a lot to learn.

Inspiring
February 18, 2010

Jongware, after seeing your code i say WOW!

then i tried this:

app.activeDocument.textFrames.everyItem().tables.everyItem().convertToText("\t","\r");

its your code but in a single line....
Shonky