Skip to main content
Inspiring
September 25, 2024
Question

Export an entire document to text files?

  • September 25, 2024
  • 3 replies
  • 2315 views

Is there any way to export all the text content of an ID file to a series of text files?

I searched for a script, just in case, but didn't hear anything.

Thanks!

 

3 replies

Robert at ID-Tasker
Brainiac
September 25, 2024

@turner111

 

Can you give more details of what exactly are you trying to achieve?

 

Do you need to import those texts back? 

 

Do you need to export to a database? 

 

turner111Author
Inspiring
September 29, 2024

Sorry for the delay - this really is just to back up contents in a non-ID file.

That said, I don't need every text box, just the "main stuff."

Robert at ID-Tasker
Brainiac
September 29, 2024
quote

Sorry for the delay - this really is just to back up contents in a non-ID file.

That said, I don't need every text box, just the "main stuff."


By @turner111

 

If you work on a PC - I can give you temporary access to the full version of my ID-Tasker tool. 

 

Then, you can export anything in any way you want. 

 

Derek Cross
Community Expert
September 25, 2024
Robert at ID-Tasker
Brainiac
September 25, 2024

@Derek Cross

 

OP needs to export into separate text files - not everything together.

 

James Gifford—NitroPress
Brainiac
September 25, 2024

InDesign has no inherent method of exporting to text, although there is an export story to RTF function buried somewhere. There are scripts, I'm sure, and any number of third-party tools (mostly for Word<->ID exchange), but you might find it quickest to export to PDF, then use Acrobat DC to export the PDF to  DOC/DOCX/RTF.

 

You can also do a select-all (Ctrl-A), copy, and paste into a Word doc, but I'm not sure how clean that comes out. It would also only capture one story at a time, so material spread over multiple flows or text boxes would take multiple grabs.

Peter Spier
Community Expert
September 25, 2024

Well, none of that is hidden at all. If there is text selected you can export to text using the File > Export dialog and the ExportAllStories script is included in the sample scripts installed with the application, but be warned that ALL stories will be exported, including every page header and footer and page number, each as a separate story so you can get hundreds of them depending on the length of your document, so selecting the text you want and using File > Export might be more practical.

James Gifford—NitroPress
Brainiac
September 25, 2024

I was being too quick and too clever — all that's 'hidden' is that the export option for RTF and text does not appear unless you have text selected, which is the kind of situational/conditional function that annoys me (it should be grayed out, at least indicating its availability). I've also found cut and copy all to be a better option in most ways.